iw-ls-page-name in component

Hi,

 

I am using iw-ls-page-name in component as below:

 

<Data>
<External>
<Parameters>
<Datum Exposed="false" ID="isforced" Name="Is forced" Type="Boolean">false</Datum>
<Datum ID="iw-ls-page-name" Name="iw-ls-page-name" Exposed="false" Type="String"/>
</Parameters>
<Object>com.web.Navigation</Object>
<Method>getNav</Method>
</External>
</Data>

 

And I am trying to use the datum iw-ls-page-name in XSL as below:

 

<xsl:variable name="thispage" select="//Datum[@Name='iw-ls-page-name']" />
<h1><xsl:value-of select="/Properties/Data/External/Parameters/Datum[@Name='iw-ls-page-name']" /></h1>

 

But I am not getting any value in the variable.

 

Thanks

Comments


  • gmitt wrote:


    <Datum ID="iw-ls-page-name" Name="iw-ls-page-name" Exposed="false" Type="String"/>
     

    And I am trying to use the datum iw-ls-page-name in XSL as below:

     

    <xsl:variable name="thispage" select="//Datum[@Name='iw-ls-page-name']" />
    <h1><xsl:value-of select="/Properties/Data/External/Parameters/Datum[@Name='iw-ls-page-name']" /></h1>

     

    But I am not getting any value in the variable.

     


    Maybe I'm missing something (I don't do a lot of component / external development) but you defined the iw-ls-page-name datum as an empty, non-exposed, string - so I'm not sure from where you would expect to get a value when referencing the datum in your code.

  • Well part of the issue is you've defined a datum that already exists (automatically provided by the engine). So remove your custom datum and then this should work:

     

    <h1><xsl:value-of select="/Properties/Data/External/Parameters/Datum[@Name='iw-ls-page-name']" /></h1>
  • Thanks, But I tried this also. This is also not working.

  • I Hope you are adding the component to page and then veriifying the value of iw-ls-page-name.

     

    Thanks

    Paul

  • Yes, I am adding component to the page and then checking.

  • "Not working" is not exactly a helpful description. Try using a very basic template and debug from there.

     

    <xsl:template match="/">
    <xsl:copy-of select="/" />
    </xsl:template>

    Is the iw-ls-page-name element appearing in that output?

  • Hi,

     

    Try this - 

    <xsl:value-of select="//Datum[@Name='iw-ls-page-name']" disable-output-escaping="yes" />
  • Element is apperaing in the page, but it is empty.

TeamSite Developer Resources

  • Docker Automation

  • LiveSite Content Services (LSCS) REST API

  • Single Page Application (SPA) Modules

  • TeamSite Add-ons

If you are interested in gaining full access to the content, you can register for a My Support account here.
image
OpenText CE Products
TeamSite
APIs