Search

<xsl:for-each select="data/main-banner/entry">



            <input type="text" value="{background-colour}" id="bg_color_code" />

        </xsl:for-each>

In this code i want to increment the ID specified according to the for loop.

For example, if i declare a variable called "i". It should increment to "id"+"i". "bgcolorcode"+"i".

Please provide solution for this.

Thanks in advance. Regards Uthayavin

Try using a recursive template.

Like this?

<input type="text" value="{background-colour}" id="bg_color_code_{position()}" />

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