Undocumented GetImage macro function usable?

Pedro Costa asked on March 17, 2014 12:39

Hi There,

I started developing a custom macro to get an image based on an attachment guid, to my surprise and confusion I realized that a GetImage macro is already implemented (my custom macro name was also named GetImage), however it's not documented anywhere that I can find:

{% CurrentDocument.ProfileImage.GetImage(CurrentDocument.ProfileName) #%}

Works just fine. Can someone confirm this is usable? In the sense that it will not be dropped on future versions? I have a v7.0.70 full installation without any custom modules or plugins.

Thanks, P.

Recent Answers


Filip Ligač answered on March 17, 2014 16:49

Hi Pedro,

GetImage() macro method is only mentioned in the list of transformation methods (Context Help - Methods in transformations) but they work the same way and I strongly believe it will still be available in future versions as well so I do not think you should be much concerned about whether or not it will still be supported.

0 votesVote for this answer Mark as a Correct answer

Pedro Costa answered on March 19, 2014 05:41

Hi Filip,

Many thanks that's kinda of a relief, strangely do the signature of the transformation method is not the same as i'm using. Note i'm sending CurrentDocument.ProfileName for alt text as the second argument - CurrentDocument.ProfileImage being the first.

Eventhough there no such signature on the transformation method guide, it is working.

Any idea whether the other transformation methods can be used the same way? E.g. in a macro?

Thanks, P.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.