On Mon, Dec 10, 2012 at 10:49 AM, Gerritjan Koekkoek
<gerritjankoekk...@gmail.com> wrote:
> Hi I'm trying to set the panel header text based on the content of a wiki 
> document that can be translated.
> So if the document is translated, the header of the panel will automatically 
> change if the document title is changed.
>
> Since the Documentation suggested setting a page header of level 1 to 4 will 
> automatically as document title in breadcrumb (which works) I am looking for 
> the code that will put that title in the panel header, but getDisplayTitle 
> gives me the document name
> I've tried also to set the title in the editor but same result, I get the 
> document name
> Any suggestion?
>
> {{velocity}}

> #set($menuDocument = $xwiki.getDocument('Sandbox.HomepageMenu1'))

This gives you the default translation which maybe doesn't have the
title set or it doesn't have any headings in the content. Have you
tried:

#set($menuDocument =
$xwiki.getDocument('Sandbox.HomepageMenu1').getTranslatedDocument())

Hope this helps,
Marius

> #set($menuSections = $menu1Document.getSections())
> #set($panelHeaderText = $menuDocument.getDisplayTitle())
> #panelheader($panelHeaderText)
>  #set($menuText=$menuDocument.getTranslatedContent())
> $menuText
> #panelfooter()
> {{/velocity}}
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to