On May 7, 2010, at 9:02 PM, Andreas Hahn wrote:
Hi,
yes, unfortunately the hyperlink on the logo is hardcoded to Main.WebHome.
You'll find this in the file global.vm in the templates / skins folder
of your xwiki installation.
Extract from that file:
<div id="company">
<div id="companylogo">
<a href="$!xwiki.getURL("Main.WebHome", "view")"
title="Home"
rel="home">
#set($logoname = $xwiki.getSkinPreference("logo",
"logo.png"))
#set($logo = $!prefdoc.getAttachment($logoname))
#if(!$logo)
#set($logourl = $xwiki.getSkinFile($logoname))
#else
#set($logourl = $prefdoc.getAttachmentURL($logo.filename,
"download"))
#end
<img src="$!logourl" alt="Wiki Logo"/>
</a>
</div> companylogo
</div> company
You can change this in your installation, there is more than one option.
One way to override skins is documented here:
http://platform.xwiki.org/xwiki/bin/view/DevGuide/Skins#HD.OverridingtheSki…
It would be more consistent imho, if the default implementation of
global.vm would refer the settings
xwiki.defaultweb=MySpace
xwiki.defaultpage=WebHome
Definitely and this is the plan for the future (not these params but others in
xwiki.properties - these one will get deprecated in the future). However before we can do
that we need to continue the reference refactoring we have started in XE 2.2 and 2.3 since
there are still a lot of places where the default space and default page are hardcoded.
Right now the simple solution for Gabriel's needs is to use a redirect.
Thanks
-Vincent
Andreas
Gabriel Corrêa de Oliveira schrieb:
> Hi everybody
>
> I'm having a really hard time to change the default home for my XWiki
> installation.
>
> I'm using version 2.2 out of the box with HSQLDB.
>
> I've edited the web.xml to enable the Redirect Servlet and make it redirect
> the user to a specific space WebHome.
>
> <servlet>
> <servlet-name>redirectHomeServlet</servlet-name>
>
<servlet-class>com.xpn.xwiki.web.HomePageRedirectServlet</servlet-class>
> <init-param>
> <description>The address to redirect to when the client hits the root
> of the application.</description>
> <param-name>homePage</param-name>
> <param-value>bin/MySpace/WebHome</param-value>
> </init-param>
> </servlet>
>
> This works fine, when I reach the root of the container
> (
http://myhost:8080/), but when I click the logo.png (with the
XWiki.org
> logo) it still points to view/Main.
>
> As an attempt to make the logo point to my specific space and WebHome I
> tried to set the following properties in xwiki.cfg:
>
> xwiki.defaultweb=MySpace
> xwiki.defaultpage=WebHome
>
> But it had absolutely no effect.
>
> I just can't believe there isn't a simpler way to change the home. It seems
> to me, that it's something every XWiki user would want to do.
>
> Any ideas?