On Mon, Dec 10, 2012 at 12:20 PM, Gerritjan Koekkoek <[email protected]> wrote:
Hi,
This is working.
When I edit the document I indeed see two translations; a 'en' and a '.' version. Where is this '.' version coming from? It looks when you create a document it does not automatically set the language? When I set the language later to 'en' it creates this '.' version
This is strange. Double check you localization configuration in the wiki administration. Maybe you added by mistake "." in the list of supported languages. Hope this helps, Marius
Thanks a lot… Gerritjan
Op 10 dec. 2012, om 10:10 heeft Marius Dumitru Florea <[email protected]> het volgende geschreven:
On Mon, Dec 10, 2012 at 10:49 AM, Gerritjan Koekkoek <[email protected]> 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 [email protected] http://lists.xwiki.org/mailman/listinfo/users
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users