FreeMarker templates can be loaded from the file system, but they can also be loaded from jars or the JCR repository. The contact.ftl used by this particular STK paragraph is indeed embedded in the STK jar (module-magnolia-standard-templating-kit).
No, there is usually no need to build Magnolia from source. Magnolia is very extensible by nature, I have never built Magnolia from source myself for any customization. Nils. ________________________________________ Van: [email protected] [[email protected]] namens medikgt [[email protected]] Verzonden: zondag 12 december 2010 17:38 Aan: [email protected] Onderwerp: RE: [magnolia-user] Displaying data nodes from data module in templates Hi, I'm not quite understanding this. I went through the http://documentation.magnolia-cms.com/templating/introduction.html templating tutorial and helloworld.ftl was an actual file that I created and referenced in the template path relative to /webapps/magnoliaAuthor/templates/... Are you saying that the contact.ftl that I'm looking for is embedded in a jar? Also, to do anything more advanced than the tutorial, does this mean that I have to build magnolia from source? Thanks, I am relative new to this. Nils Breunese-2 wrote: > > > Hi, > > A feature of FreeMarker templates is that they can be loaded from jars or > the JCR repository. This template is part of the STK > (magnolia-module-standard-templating-kit) jar and you can also find it in > the repository by going to AdminCentral > Templating Kit > Templates > > /templating-kit/paragraphs/teasers/contact.ftl. You can even modify the > template there (don't forget to check enable to override the template > loaded from the jar file). > > By the way, you'll find that the FreeMarker template gets its data from > the paragraph's model class. You'll find the paragraph definition for the > stkTeaserContact paragraph under AdminCentral > Templating Kit > Paragraph > Definitions > /teasers/stkTeaserContact. There you'll find the path to the > FreeMarker template and the associated model class: > info.magnolia.module.templatingkit.paragraphs.ContactModel. If you open up > the source for this class [0] you'll find how it fetches the data for the > contact from the data module. > > Hope this is enough to get you going. Check out the STK Book and other > documentation on http://documentation.magnolia-cms.com/ for more details. > > Nils. > > [0] Trunk HEAD is here: > http://svn.magnolia-cms.com/view/community/modules/standard-templating-kit/trunk/magnolia-module-standard-templating-kit/src/main/java/info/magnolia/module/templatingkit/paragraphs/ContactModel.java > > P.S. Note that AdminCentral > Templating Kit is just a shortcut for > AdminCentral > Configuration > /modules/standard-templating-kit. > ________________________________________ > Van: [email protected] [[email protected]] > namens medikgt [[email protected]] > Verzonden: zaterdag 11 december 2010 2:21 > Aan: [email protected] > Onderwerp: [magnolia-user] Displaying data nodes from data module in > templates > > What I'm trying to do is something similar to what is already done in the > http://demoauthor.magnolia-cms.com/demo-features/aggregation-paragraphs/contact-paragraph.html > demo-feature project. There is a data node that is created from the > authoring interface and I am able to query for it using the JCR Query Tool > and view it in the JCR browser. What I want to do now is to create a > template or a paragraph to display it with the STK just like in the demo > features project. I can't find the sample contact FTL/JSP page anywhere > in > my wepapp folder. How can I find out how to display my nodes from the > data > module on a STK template? > > > Note: When I browsed "Templating Kit" > "Paragraph Definitions" > > "teasers" >> "stkTeaserContact" > templatePath, the template path is > "/templating-kit/paragraphs/teasers/contact.ftl". I could not find this > on > my filesystem. > -- > View this message in context: > http://old.nabble.com/Displaying-data-nodes-from-data-module-in-templates-tp30431299p30431299.html > Sent from the Magnolia - User mailing list archive at Nabble.com. > > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <[email protected]> > ---------------------------------------------------------------- > > ------------------------------------------------------------------------ > VPRO > phone: +31(0)356712911 > e-mail: [email protected] > web: www.vpro.nl > ------------------------------------------------------------------------ > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <[email protected]> > ---------------------------------------------------------------- > > > -- View this message in context: http://old.nabble.com/Displaying-data-nodes-from-data-module-in-templates-tp30431299p30439267.html Sent from the Magnolia - User mailing list archive at Nabble.com. ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ---------------------------------------------------------------- ------------------------------------------------------------------------ VPRO phone: +31(0)356712911 e-mail: [email protected] web: www.vpro.nl ------------------------------------------------------------------------ ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
