0 users online. Create an account or sign in to join them.Users

Search

Hi,

I want to display the value of the root-page as heading. My xml looks like this:

<data><navigation>
    <page handle="home" id="64">
        <name>Homepage</name>
        <types>
            <type>index</type>
        </types>
    </page>
    <page handle="cat1" id="77">
        <name>Category1</name>
    </page>
    <page handle="cat2" id="79">
        <name>Category2</name>
        <page handle="subcat1" id="80">
            <name>Subcategory1</name>
        </page>
    </page>

And I thought I could use something like this:

<h1><xsl:value-of select="data/navigation/page[@handle = $root-page]/name"/></h1>

You're missing a slash / in front of data/...:

<h1><xsl:value-of select="/data/navigation/page[@handle = $root-page]/name"/></h1>

$%'!

Thanks! :-)

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