[xwiki-users] Full title in Insert/edit link dialog
Hello, I am building a documentation wiki and have hundreds of pages being generated by scripts. In generating the pages I have used an existing unique identifier as the name of the document. Now when using the Insert/edit link dialog in the Wysiwyg editor, I can only see the short name (i.e. the unique identifier). Since this makes it difficult for my users to recognize which document to link to, I would prefer to see the title in this dialog. Is there any way to change this? Is a velocity template being used for this dialog. Thanks, Henk -- == Henk F. Schouten, ICT-architect, Dienst ICT room: SL 2.32, phone (31) 70 4457611, email: [email protected] De Haagse Hogeschool, Johanna Westerdijkplein 75, 2521 EN the Hague (NL)
Henk Schouten wrote:
Hello,
I am building a documentation wiki and have hundreds of pages being generated by scripts. In generating the pages I have used an existing unique identifier as the name of the document. Now when using the Insert/edit link dialog in the Wysiwyg editor, I can only see the short name (i.e. the unique identifier). Since this makes it difficult for my users to recognize which document to link to, I would prefer to see the title in this dialog. Is there any way to change this? Is a velocity template being used for this dialog.
Thanks, Henk
In the /templates/ directory, search for all files ending in wysiwyg.vm, and inside them replace the $bentrydoc.name call *inside* the link with $bentrydoc.displayTitle. Be sure not to replace the call executed in the javascript code, since that one is needed to identify the page. For example, inside searchwysiyg.vm, replace: <a href="#" onclick="document.forms[0].wiki_page.value='$bentrydoc.name';if ('$doc.space' != '$bentrydoc.space') document.forms[0].wiki_space.value='$bentrydoc.space'; else document.forms[0].wiki_space.value=''; return false;"> $bentrydoc.name</a> with: <a href="#" onclick="document.forms[0].wiki_page.value='$bentrydoc.name';if ('$doc.space' != '$bentrydoc.space') document.forms[0].wiki_space.value='$bentrydoc.space'; else document.forms[0].wiki_space.value=''; return false;"> $bentrydoc.displayTitle</a> Notice the change on the last line. -- Sergiu Dumitriu http://purl.org/net/sergiu/
participants (2)
-
Henk Schouten -
Sergiu Dumitriu