Hello community!
I am here about macro plugin development.
I’ve been trying to render a Macro inside another macro but nothing works for me so far.
I know in a usermacro I can just use what xml is written in the edito but when I try to use exactly that in a plugin .vm it doesn’t render.
So I thought I might try getting it via Java. So I Imported the ThemeHelper. Only I couldn’t… What I did:
@Scanned
@Named("Favourites")
public class WatchedOverview implements Macro {
private final NotificationManager notificationManager;
private final SettingsManager settingsManager;
private final PageManager pageManager;
private final ThemeHelper helper;
@Autowired
public WatchedOverview(@ComponentImport CacheManager cacheManager,
@ComponentImport I18nResolver i18nResolver,
@ComponentImport NotificationManager notificationManager,
@ComponentImport SpaceManager spaceManager,
@ComponentImport PermissionManager permissionManager,
@ComponentImport SettingsManager settingsManager,
@ComponentImport PageManager pageManager,
@ComponentImport ThemeHelper helper) {
this.pageManager = pageManager;
this.notificationManager = notificationManager;
this.settingsManager = settingsManager;
this.helper = helper;
}
And then I would’ve added the helper to the velocity parameters. But like I said it made the plugin crash.
I also tried the “$action” parameter from https://developer.atlassian.com/confdev/development-resources/confluence-architecture/confluence-internals/velocity-template-overview/confluence-objects-accessible-from-velocity
But still nothing.
Can someone help me? I’m at a loss.
Thanks in advance. ![]()