Search

Hi all i have an option to comment a video,after commenting want to edit the comment. For these i had created an event and it works fine. For editing, given the id as hidden field,but i don't know how to get the id dynamically. For getting id dynamically, done by selecting the data source/entry/id, but it does not given the id of entry, shows null value. How can i get id from each entry

Hi,

The ID of the entry is an attribute. In you XSLT you can access them using @[attributeName]:

This is my id:

Or

This is my id:

Hope this helps!

This is my id: ??

@remie, i cant understand your answer

Oh right... I tried to inject code... that didn't work :)

The first example:

<xsl:for-each select="/data/yourdatasource/entry">
    This is my ID: <xsl:value-of select="@id" />
</xsl:for-each>

The second example:

This is my ID: <xsl:value-of select="/data/yourdatasource/entry/@id" />

@remie , yes i am getting the id now. Thanks a lot

BTW: this is a very basic XSLT question and is not really related to Symphony. Perhaps you should look around to find a good tutorial?

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