finding landing page variant id (xsl)

Does anyone know how to get a landing page variant id in xsl? I have a nav template and i want to store the landing pages variant id in a variable but i cannot get it to pull through.

{document(landing-page)/@sys_variantid}

Any pointers greatly appreciated.

Hi Lisa

sys_variantid is just an attribute of the landing page node so there’s no need to do “document”.

landing-page/@sys_variantid

Cheers
J

As simple as that! That worked great thanks - is there a way of working up the tree as im getting the varaint id of the landing page snippet as opposed to he page?

Hi Lisa

As the landing-page node point to the html page you have to first replace the .html with .xml. Once you’ve done this and the default_variantid column has been added to your mapper you will be able to select it.

The process is explained here:
http://forum.percussion.com/showpost.php?p=2376&postcount=7

Cheers
James