Hi Tobias,
In Magnolia 4.4 you could write: ${content.metadata.template} --> this is
either the page template name or the paragraph template name.
I would assume there is an equivalent expression in magnolia 4.5, maybe someone
can give you a quick pointer.
Regards from Vienna,
Richard
-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]]
Im Auftrag von Tobias Reinhardt (via Magnolia Forums)
Gesendet: Montag, 14. Jänner 2013 16:27
An: Magnolia User List
Betreff: [magnolia-user] Re: Get name of component in freemarker
Hi
If I use ${model.definition.name} it will give me the definition name of the
area, not of the component. I could use ${model.definition.name} in the
component script. But than I would have to extend every component script with a
container div.
As I also need to give classes for the first and the last item in an area I
already have to put a container div into the area script, as those informations
(last, first) are not available in the component script (imho). Or in other
words: Apart from including a container div into all component scripts I would
like to avoid something like [code] <div class="first-entry">
<div class="textImage">
...
</div>
</div>
[/code]
Instead I would prefer:
[code]
<div class="first-entry textImage">
...
</div>
[/code]
Kind regards
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=906445c8-812e-439d-82e4-5f1991c8cf77
----------------------------------------------------------------
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]>
----------------------------------------------------------------