Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Is there a way to apply changefreq and priority to all documents of a certain document type? We will be creating a dozen articles a day and I don't want to have to manually set each article's changefreq and priority.
I added the searchEngineSitemapChangeFreq and searchEngineSitemapPriority properties to all document types, and where I enter something manually it works great.
It seemed best to go about this in the XML file. I tried to add an xsl:if that would call the document type by alias, but that doesn't seem to work.
<xsl:if test="./data [@nodeName = 'uBlogsyPost']"> <changefreq>monthly</changefreq></xsl:if >
I also desperately tried to set these values for anything that didn't have searchEngineSitemapChangeFreq, but that didn't work either.
<xsl:if test="./data [@alias='searchEngineSitemapChangeFreq'] = '' or searchEngineSitemapChangeFreq = ''"> <changefreq> monthly </changefreq> </xsl:if>
What's the right way to do this?
What version of Umbraco are you using? Since you're using uBlogsy I suspect you use Umbraco at least Umbraco 4.6 and the XML schema you're trying to match appears to be the legacy schema, which could be why the above examples does not work.
Looking forward to hear more about this.
Oops, forgot to put that on again, sorry! U 4.7.1, and how exactly do you determine the schema? (Sorry for not knowing.)
Here's part of the XSLT, in case that helps.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " ">]><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt" xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" xmlns:umbraco.contour="urn:umbraco.contour" exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets umbraco.contour "> <xsl:output method="xml" omit-xml-declaration="yes"/> <xsl:param name="currentPage"/>
I'm sure you've figured out by now, as it's nearly been a year, but just to clarify for those who might drop by this when searching, i'll explain the solution.
Exclude a doctype from Cultiv Search Engine Sitemap:
In order to exclude a doctype, you will firstly have to know it's alias.You can view it inside the settings - on the doctype you've created.
<xsl:for-each select="$parent/* [@isDoc and string(umbracoNaviHide) != '1'] | $parent/node [string(./data [@alias='umbracoNaviHide']) != '1']">
<xsl:for-each select="$parent/* [@isDoc and string(umbracoNaviHide) != '1' and name() != 'Video'] | $parent/node [string(./data [@alias='umbracoNaviHide']) != '1']">
And voila! The document type with the alias Video will now be excluded from the sitemap.
// Thomas G
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted