You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by "C. Grobmeier" <gr...@possessed.de> on 2006/11/19 15:50:29 UTC

Breadcrump Group

Hi,

i edited my pelt skin and commented out the group-tags in skinconf.xml 
cause it's marked optional. The logo disappeared, but in the breadcrumps 
i could still see:

MyGroup > MyProject

I opened site-to-xhtml.xsl and found:

   <xsl:template name="breadcrumbs">
     <xsl:if 
test="(//skinconfig/trail/link1/@name)and(//skinconfig/trail/link1/@name!='')"><a 
href="{//skinconfig/trail/link1/@href}"><xsl:value-of 
select="//skinconfig/trail/link1/@name"/></a></xsl:if>
     <xsl:if 
test="(//skinconfig/trail/link2/@name)and(//skinconfig/trail/link2/@name!='')"> 
&gt; <a href="{//skinconfig/trail/link2/@href}">  <xsl:value-of 
select="//skinconfig/trail/link2/@name"/></a> </xsl:if>
     <xsl:if 
test="(//skinconfig/trail/link3/@name)and(//skinconfig/trail/link3/@name!='')"> 
&gt; <a href="{//skinconfig/trail/link3/@href}">  <xsl:value-of 
select="//skinconfig/trail/link3/@name"/></a> </xsl:if>
     <script type="text/javascript" language="JavaScript" 
src="{$root}skin/breadcrumbs.js"/>
   </xsl:template>

When i deleted the first <xsl:if..> Tag (link1), it works as desired. I 
thought about writing a patch which looks if <group-name> exists and 
depending on the answer link1 will be written or not. But i have no deep 
knowledge about xsl and i am not sure how this should work, so i want to 
ask you to advise. Does a variable-check make sense here or not?

-- chris

Re: Breadcrump Group

Posted by "C. Grobmeier" <gr...@possessed.de>.
Thank you for enlighten me :-)
Now this piece of XSLT makes more sense to me too.

- Chris

Ross Gardler wrote:
> C. Grobmeier wrote:
>> Hi,
>>
>> i edited my pelt skin and commented out the group-tags in skinconf.xml 
>> cause it's marked optional. The logo disappeared, but in the 
>> breadcrumps i could still see:
>>
> 
> Keep reading skinconf.xml:
> 
> "Use location="none" to not display the trail (if the skin supports it)."
> 
> Or more completely:
> 
>   <!-- Some skins use this to form a 'breadcrumb trail' of links.
>     Use location="alt" to move the trail to an alternate location
>     (if the skin supports it).
>     Omit the location attribute to display the trail in the default 
> location.
>     Use location="none" to not display the trail (if the skin supports it).
>     For some skins just set the attributes to blank.
> 
>     NOTE: If a breadcrumb entry points at a local file the href must
>     be complete, that is it must point to the file itself, not to a
>     directory.
>   -->
>   <trail>
>     <link1 name="myGroup" href="http://www.apache.org/"/>
>     <link2 name="myProject" href="http://forrest.apache.org/"/>
>     <link3 name="" href=""/>
>   </trail>
> 
> Ross


Re: Breadcrump Group

Posted by Ross Gardler <rg...@apache.org>.
C. Grobmeier wrote:
> Hi,
> 
> i edited my pelt skin and commented out the group-tags in skinconf.xml 
> cause it's marked optional. The logo disappeared, but in the breadcrumps 
> i could still see:
>

Keep reading skinconf.xml:

"Use location="none" to not display the trail (if the skin supports it)."

Or more completely:

   <!-- Some skins use this to form a 'breadcrumb trail' of links.
     Use location="alt" to move the trail to an alternate location
     (if the skin supports it).
     Omit the location attribute to display the trail in the default 
location.
     Use location="none" to not display the trail (if the skin supports it).
     For some skins just set the attributes to blank.

     NOTE: If a breadcrumb entry points at a local file the href must
     be complete, that is it must point to the file itself, not to a
     directory.
   -->
   <trail>
     <link1 name="myGroup" href="http://www.apache.org/"/>
     <link2 name="myProject" href="http://forrest.apache.org/"/>
     <link3 name="" href=""/>
   </trail>

Ross