For a particular dynamicAlbum-type view I'd like to include an itemLink but for that one view only.
I can't include it in the module.inc getItemLinks() because I have no visibility of which view is loading. If I did, it would appear everywhere.
I could include it in that View's LoadTemplate():
$theme['itemLinks'][]= array('text' => "My special item link for this view only", ...
However, in GalleryView.class the *View's* loadTemplate() is called (line 300) *before* the theme's loadTemplate() (line 308), and the theme's loadTemplate() overwrites whatever's already in the itemLinks array when it executes loadCommonTemplateData() since that's when it collects the itemLinks from the set of relevant and active modules.
Is there another way I can do this? Obviously, since this is a dynamicAlbum type I don't have my own template file in which I can insert links in a more traditional manner.
Any suggestions will be appreciated.
Posts: 8601
Can you use getItemLinks but check $gallery->getCurrentView() to determine whether or not to add the link?
Posts: 4342
Almost certainly - I shall give it a try. Excellently thanks.