Hi, I've got a question about using the dynamic sitemap. I've used it on numerous sites, and it works great. But I've come up against a problem, and I can't seem to solve it (might just be tired!)
I'm using this code:
Code cut short for brevity
The site I am working on has an option in couch to hide the page from the site navigation - If the user doesn't want the public to see the "about" page, they would select "No" from a dropdown in global.php. It still "exists", it just isn't accessible from the main navigation - and as such I wouldn't want it indexed.
My question is, how would I then incorporate this into the sitemap? I've tried this:
And this:
But obviously couch doesn't like me putting variable inside the "if". Is there any way around this?
I've been working all day, so apologies if I'm missing something obvious here.
E
I'm using this code:
- Code: Select all
<cms:templates order='asc' >
<cms:if (k_template_name eq 'sitemap.php') || (k_template_name eq 'global.php')>
<cms:else />
<cms:if k_template_name eq 'index.php' >........
Code cut short for brevity
The site I am working on has an option in couch to hide the page from the site navigation - If the user doesn't want the public to see the "about" page, they would select "No" from a dropdown in global.php. It still "exists", it just isn't accessible from the main navigation - and as such I wouldn't want it indexed.
My question is, how would I then incorporate this into the sitemap? I've tried this:
- Code: Select all
<cms:pages masterpage="global.php">
<cms:if view_about ="yes"><cms:set a_str="" scope='global'/><cms:else /><cms:set a_str=" || (k_template_name eq 'about.php')" scope='global'/></cms:if>
</cms:pages>
<cms:templates order='asc' >
<cms:if (k_template_name eq 'sitemap.php') || (k_template_name eq 'global.php' a_str>
And this:
- Code: Select all
<cms:if (k_template_name eq 'sitemap.php') || (k_template_name eq 'global.php' <cms:show a_str />>
But obviously couch doesn't like me putting variable inside the "if". Is there any way around this?
I've been working all day, so apologies if I'm missing something obvious here.
E