XSL question for AlexT

code from breadcrumbs.xsl

 

<xsl:template name="breadcrumbs">

    <xsl:param name="link0" />
    <xsl:param name="link1" />
    <xsl:param name="link2" />

    <div id="f_breadcrumb" class="sys_bc_wrapper bx-def-margin-top bx-def-padding bx-def-border">

        <!-- <a href="{/root/urls/base}" onclick="return f.selectForumIndex()">[L[Forums]]</a> -->
        <a href="{/root/urls/base}">[L[Forums]]</a>
        <xsl:if test="string-length($link1)">
 &#160;&#8250;&#160;
            <xsl:copy-of select="$link1" />
        </xsl:if>

        <xsl:if test="string-length($link2)">
 &#160;&#8250;&#160;
            <xsl:copy-of select="$link2" />
        </xsl:if>

        <xsl:if test="string-length($link0)">
    		<span class="permalink"><xsl:copy-of select="$link0" /></span>
        </xsl:if>

    </div>    

</xsl:template>

What I want to do, is instead of outputting those characters in red, output something like this:

<span class="sys-icon caret-right"></span>

 

So far, all I have been able to determine, is that I really fckn hate xsl

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 18 Oct 2015

Yes, it is possible. So far we will not incorporate this change into the package, since current implementation looks nice and can be easily to be override in the custom template. 

Rules → http://www.boonex.com/terms
Quote · 19 Oct 2015

 

Yes, it is possible. So far we will not incorporate this change into the package, since current implementation looks nice and can be easily to be override in the custom template. 

 I'm not asking to incorporate this change in the package.  Overriding in a template is exactly what I want to do... that's why I posted this in the questions forum.  I was just seeking advice on how to put that bit of code into breadcrumbs.xsl and not have it stripped out by the xsl  processor. In a different file, simply substituting the html code for the string of unicode characters worked fine, but in this case it is stripped out.

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 19 Oct 2015

Well thanks for telling me it's possible Alex.  That's good to know.  I'll just go bang my head on the wall for a few more days and see if I can figure it out on my own.

Sometimes this damn Orca Forum makes me want to kill myself.  Why can't it just be coded in php like all the other modules?

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 19 Oct 2015

All you need is to change the following file modules/boonex/forum/layout/TMPL/xsl/breadcrumbs.xsl:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">

    <xsl:include href="../../base/xsl/breadcrumbs.xsl" />

</xsl:stylesheet>

with the contents of modules/boonex/forum/layout/base/xsl/breadcrumbs.xsl file with all needed changes applied:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">

<xsl:template name="breadcrumbs">

    <xsl:param name="link0" />
    <xsl:param name="link1" />
    <xsl:param name="link2" />

    <div id="f_breadcrumb" class="sys_bc_wrapper bx-def-margin-top bx-def-padding bx-def-border">

        <!-- <a href="{/root/urls/base}" onclick="return f.selectForumIndex()">[L[Forums]]</a> -->
        <a href="{/root/urls/base}">[L[Forums]]</a>

        <xsl:if test="string-length($link1)">
            &#160;&#8250;&#160;
            <xsl:copy-of select="$link1" />
        </xsl:if>

        <xsl:if test="string-length($link2)">
            &#160;&#8250;&#160;
            <xsl:copy-of select="$link2" />
        </xsl:if>

        <xsl:if test="string-length($link0)">
    		<span class="permalink"><xsl:copy-of select="$link0" /></span>
        </xsl:if>

    </div>    

</xsl:template>

</xsl:stylesheet>

then recompile forum language files for this template.

 

Forum was the beginning of new Platform which was going to be Trident and the BoonEx is working on now.

Rules → http://www.boonex.com/terms
Quote · 19 Oct 2015

 

with the contents of modules/boonex/forum/layout/base/xsl/breadcrumbs.xsl file with all needed changes applied:

 Alex, the point I have been trying to make, is that I don't have a damn clue what the needed changes are.  Those changes aren't obvious to some of us.

 

For instance, stupid me thought that if I replaced this:

        <xsl:if test="string-length($link1)">
            &#160;&#8250;&#160;
            <xsl:copy-of select="$link1" />
        </xsl:if>

with this:

        <xsl:if test="string-length($link1)">
            <span class="sys-icon caret-right"></span>
            <xsl:copy-of select="$link1" />
        </xsl:if>

That it would simply work. It doesn't because the html code is stripped out.

 

        <xsl:if test="string-length($link1)">
            &#160;&#61658;&#160;
            <xsl:copy-of select="$link1" />
        </xsl:if>

 

Doesn't matter, because I tried replacing &#8250; with   &#61658;  and it worked.  Also had to add font-family:sys-icon; to relevant css in several places.   Seems as though converting the Font Awesome hex value to decimal works.... I didn't know you could do that, until a few minutes ago. It's not perfect, but I can live with it.... I would have liked to be able to target it individually to change font size independently of the rest of the text, but that's not possible with this solution. I would have liked the caret a bit smaller than the rest of the text.

 

 

f-breadcrumb.png · 266.8K · 323 views
My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 19 Oct 2015

See.... now I can make really stupid looking forum breadcrumb menu if I want to.

 

f-breadcrumb2.png · 37.3K · 313 views
My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 19 Oct 2015

Is there a way to create the forums as ascending or descending in posts?

 

Thank you

Authors Bag Portal is a Crowd Sourcing Collaboration (CSC)
Quote · 21 Nov 2015

 

Is there a way to create the forums as ascending or descending in posts?

 

Thank you

Why did you hijack this thread instead of posting a new forum topic?

Geeks, making the world a better place
Quote · 21 Nov 2015
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.