Thanks, Grégory. I've got this structure now; does it look right? Is the subTemplates templatePath correct? One question -- should the "visible" data node be Boolean type or string, or does it matter?
- modules - unctv (folder) - templates (folder) - home (template) - subTemplates (template) [data nodes] - print - extension print - templatePath /modules/unctv/templates/home/sub/print.jsp - type jsp [data nodes] - description This is Alex's template. - i18Basename info.magnolia.templating.messaging - templatePath /modules/unctv/templates/home/home.jsp - title Project: Alex's New Template - type jsp - visible true Sincerely, Alex Cougarman UNC-TV Web Applications Developer 919-549-7823 ---------------------------------- ""The quality of mercy is not strained, It droppeth as the gentle rain from heaven Upon the place beneath: it is twice blest, It blesseth him that gives and him that takes." Shakespeare, The Merchant of Venice ----- Original Message ----- From: "Grégory Joseph" <[email protected]> To: "Magnolia User-List" <[email protected]> Sent: Tuesday, July 20, 2010 4:15:36 PM Subject: Re: [magnolia-user] templatePath - custom module On Jul 20, 2010, at 21:46, Alex Cougarman wrote: > Hi, > > I’m trying to figure out what the templatePath should be if we use a custom > module. So, in AdminCentral, under Configuration, I have the following > structure: > > - modules > - unctv > - myProject > -myTemplate > [data nodes] > - description > - i18Basename > - templatePath > - title > - type > - visible > > I’m following the template example given here: > http://documentation.magnolia-cms.com/templating/introduction.html but using > a custom module (called “unctv”). The path given in the example is > /templates/myProject/templates/helloworld.ftl > > What would the path be for this custom module’s templatePath? It's arbitrary. If you use files (ie jsp), you'll have to have a part of the path named after your module to ensure the file gets extracted at installation time, otherwise the path is entirely up to you. It's probably a good idea to name part of it after your module, for consistency, though. Note that you're missing a "templates" node in the structure above (this is how the templating module will pick the template definitions): it should be /modules/unctv/templates/myProject/myTemplate (and note the "myProject" path part is also non-mandatory and arbitrary, just there to help you group templates if needed) hth, -g ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ---------------------------------------------------------------- ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
