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]>
----------------------------------------------------------------

Reply via email to