Jahia Dev Forum > assign page title...

0 (0 Good)
0 (0 Bad)

assign page title dynamic

by  erdem_ustun »  2011/06/07 20:42

Hi,
can I assign page title dynamic ?
I want to change MY PORTAL to logged in name.
example;
my cn is erdem ustun so after log in jahia portal to see erdem ustun instead of MY PORTAL
is it possible? if yes,how
can you explain?
thanks

  (erdem_ustun)

Number of messages  50
Registration date
0 (0 Good)
0 (0 Bad)

Re: assign page title dynamic

by  dgriffon »  2011/06/07 20:42

Hello

In the latest build of jahia you can set the page title by setting the title parameter in the <template:templateHead/> tag.

Best regards

David

David Griffon (dgriffon)

Number of messages  76
Registration date
0 (0 Good)
0 (0 Bad)

Re: assign page title dynamic

by  erdem_ustun »  2011/06/07 20:42

 

dgriffon wrote:

Hello

In the latest build of jahia you can set the page title by setting the title parameter in the <template:templateHead/> tag.

Best regards

 

David

which file or where is the <template:templateHead/> tag.

  (erdem_ustun)

Number of messages  50
Registration date
0 (0 Good)
0 (0 Bad)

Re: assign page title dynamic

by  pap@commaro.com »  2011/06/07 20:42

Hello,

if you have the source - the tag is (among other tags) defined here:

jahia-root\taglib\src\main\resources\META-INF\template.tld

and implemented in:

jahia-root\taglib\src\main\java\org\jahia\taglibs\template\templatestructure\TemplateHeaderTag.java

As David said in the CE the title was always the page-title, but some time afterwards (for the EE) we added the possibility to assign a dynamic title by setting it as an attribute of this tag.

Regards,
Benjamin

Benjamin Papez (pap@commaro.com)

Number of messages  220
Registration date
0 (0 Good)
0 (0 Bad)

Re: assign page title dynamic

by  twr »  2012/09/12 09:53

Hi,

I have, what I believe is Enterprise version of Jahia v6.6.0.1.

I was looking for this <template:templateHead/> tag and couldn't find it.

Did anything change between versions?

 

Thanks,

Tomek

  (twr)

Number of messages  1
Registration date
1 (1 Good)
0 (0 Bad)

Re: Re: assign page title dynamic

by  pap@commaro.com »  2012/09/21 22:25

Hello Tomek,

this tag is no longer existing in v6.6

Now the <head> section with the page title is set in the templates*.jsp . For instance for the ACME space demo it is in templates-web-space\src\main\webapp\jnt_template\html\template.templates-web-space.jsp

<title>${fn:escapeXml(renderContext.mainResource.node.displayableName)}</title>

You could modify that in your custom templates.

Regards,
Benjamin
 

Benjamin Papez (pap@commaro.com)

Number of messages  220
Registration date
Contact
Share
Feedback

Get in touch

Whether you are a current user or if you are just evaluating Jahia, we are here to help.

Contact us

Share this page