Search

A new Extension, “Breadcrumb” is now available for download. Comments and feedback can be left here but if you discover any issues, please post it on the issue tracker.

Hey, I just sent a pull request for this extension in order to make it compatible with Language Redirect and Multilingual Field...

@nitriques

If you need the parent hierarchy, PLH supplies a datasource just for this purpose :)

@vladG:

Yes I know, tried it, but without any luck. Traversing the tree upwards was not what I wanted. It take to much skill to do that in XSL and my co-workers would not be able to do it.

I really needed a "flat" list representing the page "tree" structure. Since the breadcrumb extension was already doing that, I figured it just needed a little bit of refactor.

@vladG: But I used your DS in order to build a link that translate the page :)

I have obviously missed something (in xpath) as this isn;t working for me. I am using the following XSL code:

            <ul id="breadcrumbs">
                    <xsl:for-each select="/data/breadcrumb/page">
            <li><a href="{$root}/{page/@path}"><xsl:value-of select="page" /></a></li>
                    </xsl:for-each>
        </ul>

To process this XML:

    <breadcrumb>
       <page path="attending">Attending</page>
       <page path="attending/agenda">Agenda</page>
    </breadcrumb>

The name and path values are not populating in the HTML output. Can anyone suggest why?

Thanks :-)

@stuartgpalmer

This should fix your problem... try replacing page by dot (.). Dot will refer to the current element

  <ul id="breadcrumbs">
                <xsl:for-each select="/data/breadcrumb/page">
        <li><a href="{$root}/{./@path}"><xsl:value-of select="." /></a></li>
                </xsl:for-each>
    </ul>

Thanks @Nitriques. That did the job and taught me a new Xpath trick :-)

@stuartgpalmer: You're welcome... You can use this with apply-templates too.

You can check http://www.w3schools.com/xsl/ for a quick formation in XSL. I use this site a lot for reference in diverse w3 fields (html, css, javascript, xsl(t))

./@path could simply be written as @path.

Not sure where to post this as there is not an issue tracker in the Symphonists/breadcrumb repo.

The May 1 and 2 commits are not compatible with Symphony 2.2.5 and creates this error: Argument 1 passed to datasourceBreadcrumb::__construct() must be an array, object given, called in /Users/wjn/Sites/nielsendigital.com/subdomains/business-manager/public/symphony/lib/toolkit/class.datasourcemanager.php on line 179 and defined /Users/wjn/Sites/nielsendigital.com/subdomains/business-manager/public/extensions/breadcrumb/data-sources/data.breadcrumb.php line 41

36       * Class constructor
37       * @param object $parent
38       * @param array $env
39       * @param boolean $process_params
40       */
41      public function __construct(Array $env = null, $process_params=true){
42          parent::__construct($env, $process_params);
43
44          // detect if multilangual field AND language redirect is enabled
45          $this->isMultiLangual =

The February 21 commit (4593ddef2e9894b5e5d566d881bfcd5f23663581) is the commit that works with Symphony 2.2.5

So simply pulling (submodule or otherwise) breadcrumb master branch on a Symphony 2.2.5 install will create the error; however, git checkout 4593ddef2e9894b5e5d566d881bfcd5f23663581 will solve the problem.

@wjnielsen I guess this will happen with a lot of other extensions as well, since many break compatibility with 2.2.5 on the master branch as they get updated for 2.3.

Edit:

Great article by phoque on how to handle submodules correctly without breaking shit...

Good article, jensscherbl. Thanks for the response.

I've been wondering, it it possible to achieve the following? (in pseudo)

IF currentpage IS NOT "Home" > put a li.breadcrumbfirst before the list with "Home" IF current_page IS "Home" > Leave out the Home list item.

Does this make any sense? I haven't been able to figure this one out.

I've been wondering, it it possible to achieve the following? (in pseudo)

Here you go...

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details