Search

<xsl:template name="get-images">
<xsl:param name="entry-id"/>
<xsl:if test="/data/article-images/entry[article/item/@id = $entry-id]">
    <div class="article-images">
        <xsl:apply-templates select="/data/article-images/entry[article/item/@id = $entry-id]"/>
    </div>
</xsl:if>
 </xsl:template>

Where do I get the entry-id from? Is it passed from this code?

<xsl:call-template name="get-images">
        <xsl:with-param name="entry-id" select="@id"/>
    </xsl:call-template>

Whereas the @id is the id of the entry.

That’s correct. So make sure that the select attribute of the with-param element is accurate in the context in which you’re calling the template.

ok 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