Hi,

You can't just add new templates in the template.xml file because it is read only at deployment, when expanding files from the JAR lying in "TOMCAT_HOME/webapps/jahia/WEB-INF/var/shared_templates". To include a new template file into an existing set already deployed in Jahia, you have to register the template using Administration -> Site settings -> Manage templates. There you can manually add a new template file that you created inside the existing template directory for the appropriate site.

Here is an example :
Supposed you've created a site called "mySite" using the default templates packaged with Jahia 5 (the package name is "corporate_portal_templates_v2"), you should have this directory : "TOMCAT_HOME/webapps/jahia/jsp/jahia/templates/mySite/ corporate_portal_templates_v2" Into this directory, you can add JSP files that will be used as templates but only if you add them manually using the site administration (see above). So for example, if you want to add the file "newTemplate.jsp" to the template set for the site mySite, just fill the fields using these values :
Template name : New Template
Template Folder : /corporate_portal_templates_v2
File Name : newTemplate.jsp
Don't forget to check "Available to users" as well.

Then press "Save" and you should get a successful deployment message.

Don't forget that any change made this way won't impact the template JAR file lying in TOMCAT_HOME/webapps/jahia/WEB-INF/var/ shared_templates, and therefore any other site using the same template set won't have the new templates you added for the site "mySite".

I hope this is enough, don't hesitate to ask if you have further questions.

Regards,

Romain


Le 22 juil. 08 à 15:22, Nitin Aggarwal a écrit :


thanks Manish,

I was going through the template guide given on jahia site..
but i am unable to understand where i can try out the changes i am trying to
make going through the tutorial.

I have created a sample template copying the default template and making a
few changes in that according to my org.
but the main problem is if i add a new entry in the templates.xml

<template browsable="1" visible="1">
                <parameter name="name">gat</parameter>
                <parameter name="filename">gat.jsp</parameter>
                <parameter name="display-name">Gat</parameter>
        </template>

and added a new folder in the templates home directory named

mytemplate-->gat.jsp
                   gat-->gat.jsp
                       -->definitions.inc
                       -->eventlistner.inc

it has 3 files gat.jsp
definitions.inc
and eventlistner.inc

where do i add stuff in order to try my new fields and containers which i
want to add.

if i add them in definitions.inc i am unable to see them...

my major concern is how do i test things so that i can understand what i am
doing.

can any one through some light ?




Manish Gupta III wrote:

Read these document this will help you to create this template.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nitin Aggarwal
Sent: Tuesday, July 22, 2008 3:22 PM
To: [email protected]
Subject: [template_list] Help needed to create a customized template
with jahia


Hi,

I am pretty new to jahia  and i have to create a template as per this
image.
http://www.nabble.com/file/p18585942/GAT.bmp

Can any one help with this.

I would like to take up the taglib approach in order to create this.

what all changes i have to make and where.

and early response will be highly appreciated

regards
Nitin Aggarwal
--
View this message in context:
http://www.nabble.com/Help-needed-to-create-a-customized-template-with-j
ahia-tp18585942p18585942.html
Sent from the Jahia - Template mailing list archive at Nabble.com.

_______________________________________________
template_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/template_list



_______________________________________________
template_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/template_list



--
View this message in context: 
http://www.nabble.com/Help-needed-to-create-a-customized-template-with-jahia-tp18585942p18587467.html
Sent from the Jahia - Template mailing list archive at Nabble.com.

_______________________________________________
template_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/template_list


°°°
Romain Felden --=[ rfelden_at_jahia_dot_com ]=--

Jahia Solutions
9 route des Jeunes
CH-1227 Les Acacias

This e-mail and its contents are subject to the DISCLAIMER at 
http://www.jahia.com/disclaimer

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
template_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/template_list

Reply via email to