Hi Erando, I'd use the node's UUID. You should be able to get that using node.getIdentifier()
I'm not sure how the node is accessed from Freemarker in Magnolia 4.5, maybe someone else can answer that. It's not quite the same as the content object, which AFAIK is just a map in magnolia 4.5. Regards from Vienna, Richard -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Im Auftrag von Erando (via Magnolia Forums) Gesendet: Mittwoch, 26. September 2012 15:15 An: Magnolia User List Betreff: [magnolia-user] Automatically generated anchors -> id is needed Hi, I want to provide a simple function. For every area and component I want to insert an anchor automatically I can refer to. For example: I got this simple script for a component only supposed to show some text: [code]${cmsfn.decode(content).text!}[/code] Now I want to extend this script by the anchor functionality. [code]<a href="#id"></a> ${cmsfn.decode(content).text!}[/code] But I don't know any way to get an id or something even though I'm sure there is one. How can I gain this id of the current component? I hope you understand my problem. How would you do that? Thank you in advance, your help is appreciated! -- Context is everything: http://forum.magnolia-cms.com/forum/thread.html?threadId=a0aceeda-7045-4cdd-8292-f112ec9b4faa ---------------------------------------------------------------- For list details, see http://www.magnolia-cms.com/community/mailing-lists.html Alternatively, use our forums: http://forum.magnolia-cms.com/ To unsubscribe, E-mail to: <[email protected]> ---------------------------------------------------------------- ---------------------------------------------------------------- For list details, see http://www.magnolia-cms.com/community/mailing-lists.html Alternatively, use our forums: http://forum.magnolia-cms.com/ To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
