Hello,
I am using the latest versions of AMPXF and Siropu Ads Manager.
I also use Google ad manager codes in Siropu Ads manager. I need to add the main category Id to the targeting json section in the GAM code.
Sample :
JSON:
json='{"targeting":{"site_div":["AMP"],"categoryId":["xxx"]}}'
Normally, I can pull the main category ID from the $breadcumb variable (inside the PAGE_CONTAINER template)
HTML:
<xf:if is="$breadcrumbs">
<xf:foreach loop="$breadcrumbs" value="$catarray" i="$i">
<xf:if is="$catarray.attributes.node_id">
<xf:set var="{$cat_id_ads.{$i}}" value="{$catarray.attributes.node_id}" />
<xf:set var="{$cat_name.{$i}}" value="{$catarray.value}" />
</xf:if>
</xf:foreach>
</xf:if>
I can't use $breadcrumbs variable in AMP_CONTAINER template.
My question is: is there any variable which I can get the main category id of the thread? If not, how do we access a variable ourselves from within the amp templates? For example to the $breadcrumbs variable.
thank you.