[xwiki-users] Changing the link behind the logo
Hi all, I uploaded my own logo.png in the header of my wiki, works great. Now I would like to change the link behind the logo, I want that it always points to the Webhome of the space the user is in, and I dont know how to do this. I allready changed some things in the global.vm of the skin, I can feel that I am almost there... But I need the code snippet for pointing towards the Webhome in the Space the user is in. Any help is greatly appreciated. -Wouter
Hi Wouter, maybe there are other ways but that's how I've done it: Search in global.vm for the line: <a href="$!xwiki.getURL('Main.WebHome')" title="Home" rel="home"> and replace 'Main.WebHome' with 'YourSpace.WebHome' Other option might be to leave global.vm as it is and redirect from Main.WebHome to your location. You'd need to insert this code on top of 'Main.WebHome': {{velocity}} #if (!$hasEdit) $response.sendRedirect($xwiki.getURL("YourSpace.WebHome")) #end {{/velocity}} enjoy Andreas Am 06.04.2011 18:09, schrieb Wouter de Vos:
Hi all,
I uploaded my own logo.png in the header of my wiki, works great. Now I would like to change the link behind the logo, I want that it always points to the Webhome of the space the user is in, and I dont know how to do this. I allready changed some things in the global.vm of the skin, I can feel that I am almost there... But I need the code snippet for pointing towards the Webhome in the Space the user is in.
Any help is greatly appreciated.
-Wouter _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
On 04/06/2011 06:09 PM, Wouter de Vos wrote:
Hi all,
I uploaded my own logo.png in the header of my wiki, works great. Now I would like to change the link behind the logo, I want that it always points to the Webhome of the space the user is in, and I dont know how to do this. I allready changed some things in the global.vm of the skin, I can feel that I am almost there... But I need the code snippet for pointing towards the Webhome in the Space the user is in.
$xwiki.getURL("${doc.space}.WebHome") -- Sergiu Dumitriu http://purl.org/net/sergiu/
Thanks Sergiu! Exactly the code I was looking for, works flawlessly! @Andreas: Your Ideas worked as well, but since I have various Spaces and want that in all spaces the Logo links to the respective WebHome, Sergius code was more what fits my needs, but thank you for your ideas as well! -Wouter On 4/6/11, Sergiu Dumitriu <[email protected]> wrote:
On 04/06/2011 06:09 PM, Wouter de Vos wrote:
Hi all,
I uploaded my own logo.png in the header of my wiki, works great. Now I would like to change the link behind the logo, I want that it always points to the Webhome of the space the user is in, and I dont know how to do this. I allready changed some things in the global.vm of the skin, I can feel that I am almost there... But I need the code snippet for pointing towards the Webhome in the Space the user is in.
$xwiki.getURL("${doc.space}.WebHome")
-- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
participants (3)
-
Andreas Hahn -
Sergiu Dumitriu -
Wouter de Vos