Search

Hey ho.. it's been a while since i've delved into matching id's on datasources so wanted a little advice please:

I have a datasource which is using the oembed field and I'm matching on the thumbnail element.. which is outputting correctly. But now I want to match the id of the entry further up the tree as I am in need of the title handle to use in a list of entries.

How would I make the number "47" in the snippet below be dynamic.. I.e match every entry id to gain it's title and handle nodes? I thought 'current()/@id' was it but not 100% here:

/data/video-list/entry[@id = '47']/title/@handle

Thanks for reading.

Also, this doesn't seem to work.. what am I doing wrong in this syhtax?

/data/navigation/page[@id ='$current-page-id']/item/@handle

It's a multilanguage site I'm trying to match categories to current page.

There shouldn't be any single quotes in the predicate condition, except you want to test for a static string.

I wan the integer so If I remove the single quotes will I get the value of $current-page-id ?

Thanks @klaftertief it worked great! now for multilingual search.. :)

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