0

I've been trying to retrieve the value of the ID from home page.

I don't know why the value retrieved is null. Im calling it from a CSElement and then testing it from the "preview" button in the SiteEntry associated with a HTML p tag.

Here is the block of code that is used:

<render:lookup varname="Home" key="Home" ttype="CSElement" match=":x"/>
<asset:load name="IDHome" type="Page" field="name" 
value='<%=ics.GetVar("Home")%>'/>
<asset:get name="IDHome" field="id" output="IDHOME"/>



<p><%=ics.GetVar("IDHOME")%></p>

I got null, but when I try to get another value like a "Dimension description" it works.

I use the same code lines, and besides it works too in another sites...

I need the id of the page to apply a lang filter

1 Answers1

0

I could think of a couple of reasons :

  • Maybe your 'site' value is getting overridden somewhere. Try to explicitly pass the site argument for 'render:lookup' tag.
  • Verify that the mapping is shared with the site that you are calling it from.