Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Eran 292 posts 436 karma points
    May 20, 2010 @ 03:01
    Eran
    0

    sitemap dont include my homepage

    hello,

    i installed the nice package.

    i created new CultivSearchEngineSitemap under my homepage (the homepage is the root - all the other content in under it),

    but the sitemap that generated, dont include my homepage from some reason.

    i looked at the xsl and i guess that one of these lines making the problem:

    <xsl:if test="umbraco.library:IsProtected($parent/@id, $parent/@path) = 0 or (umbraco.library:IsProtected($parent/@id, $parent/@path) = 1 and umbraco.library:IsLoggedOn() = 1)">
      <xsl:for-each select="$parent/node [string(./data [@alias='umbracoNaviHide']) != '1' and @level &lt;= $maxLevelForSitemap]">
       <!-- If the document does not have a template, nothing is shown in the frontend anyway.
            So this is not proper content and should not be in the sitemap -->
       <xsl:if test="@template &gt; 0">

    i guess that from some reason my homepage is not fill the condition to enter the loop, but i dont understand why.

    (the homepage have template).

    Thanks!

    Eran.

  • Sebastiaan Janssen 4847 posts 14391 karma points MVP admin hq
    May 20, 2010 @ 07:41
    Sebastiaan Janssen
    0

    • Is the homepage actually published?
    • Does the homepage have a template? Check the generic properties tab and make sure it is published while a template is selected.
    • Does the homepage have a property with the alias of "umbracoNaviHide" and is it checked on? You might want to uncheck that checkbox.
    • I don't suppose the homepage requires you to be logged in, right?
    If that doesn't help, try putting the sitemap node on the same level as the homepage, instead of under it (don't think this is going to help, there's no reason that it should really).

    Maybe you can post the XML of your homepage, in an XSLT that's in your homepage add this temporarily to get the XML:
    <textarea>
      <xsl:copy-of select="$currentPage"/>
    </textarea>

  • Eran 292 posts 436 karma points
    May 20, 2010 @ 12:04
    Eran
    0

    hello sebastiaan,

    is the homepage actually published? - yes.

    Does the homepage have a template? yes.

    Does the homepage have a property with the alias of "umbracoNaviHide" and is it checked on? checkbox unchecked.

    I don't suppose the homepage requires you to be logged in, right? no.

    try putting the sitemap node on the same level as the homepage - still not working (actually now nothing is printed on the xml sitemap).

    this is my content tree structure:

    -- content

              -- home

                     -- about

                     -- sitemap

    this is the xml of the home page: Thanks!

    <textarea><node id="1064" version="551d9258-950b-4f2b-8d59-539b9d8b04a1" parentID="-1" level="1" writerID="0" creatorID="0" nodeType="1058" template="1059" sortOrder="2" createDate="2010-04-14T07:54:48" updateDate="2010-05-18T09:04:53" nodeName="Home" urlName="home" writerName="Administrator" creatorName="Administrator" nodeTypeAlias="Home" path="-1,1064"><data alias="mediaFolder">1075</data><data alias="siteName">  </data><data alias="mediaFolderID">1150</data><data alias="metaDescription">           .  : 054-2104770</data><data alias="metaKeywords"> ,   ,  ,  , ,  ,  , , , , , , , ,  ,   , , , </data><data alias="umbracoUrlName" /><data alias="umbracoUrlAlias" /><data alias="umbracoRedirect" /><data alias="umbracoInternalRedirectId" /><data alias="umbracoNaviHide">0</data><data alias="hideInFooter">0</data><data alias="contentPageTitle"></data><node id="1089" version="e3c9ca9f-ef6e-4e46-b8d1-dd96b80118cf" parentID="1064" level="2" writerID="0" creatorID="0" nodeType="1087" template="1088" sortOrder="3" createDate="2010-04-21T00:27:25" updateDate="2010-05-18T09:05:04" nodeName="About" urlName="about" writerName="Administrator" creatorName="Administrator" nodeTypeAlias="About" path="-1,1064,1089"><data alias="bodyHeader">  ..</data><data alias="bodyText">
    &lt;p&gt; ,
    , . , .
    - ? .&lt;/p&gt;

    &lt;h3&gt; &lt;/h3&gt;

    &lt;p&gt; ,
    , . , .
    - ? .&lt;/p&gt;

    &lt;p&gt; , ,
    . , .
    - ? .&lt;/p&gt;

    &lt;blockquote&gt;
    &lt;p&gt; , ,
    .&lt;/p&gt;

    .&lt;/blockquote&gt;

    &lt;p&gt;&amp;nbsp;&lt;/p&gt;

    &lt;p&gt;&amp;nbsp;&lt;/p&gt;

    &lt;p&gt;&amp;nbsp;&lt;/p&gt;

    &lt;p&gt; , ,
    .&lt;/p&gt;

    &lt;ul class="content-list"&gt;
    &lt;li&gt; , ,
    .&lt;/li&gt;

    &lt;li&gt; , ,
    .&lt;/li&gt;

    &lt;li&gt; , ,
    .&lt;/li&gt;
    &lt;/ul&gt;
    </data><data alias="metaDescription"> . : 054-2104770</data><data alias="metaKeywords" /><data alias="umbracoUrlName" /><data alias="umbracoUrlAlias" /><data alias="umbracoRedirect" /><data alias="umbracoInternalRedirectId" /><data alias="umbracoNaviHide">0</data><data alias="hideInFooter">0</data><data alias="contentPageTitle"></data><node id="1139" version="121530c4-9243-4e9f-8d88-e69bbf493644" parentID="1089" level="3" writerID="0" creatorID="0" nodeType="1129" template="1130" sortOrder="1" createDate="2010-05-01T04:14:03" updateDate="2010-05-18T08:56:09" nodeName="Our Customers" urlName="our-customers" writerName="Administrator" creatorName="Administrator" nodeTypeAlias="Customers" path="-1,1064,1089,1139"><data alias="bodyHeader"> </data><data alias="bodyText">
    &lt;p&gt; , .
    - , .
    , -
    - .
    , ,
    .&lt;/p&gt;
    </data><data alias="metaDescription"> ! : 054-2104770 </data><data alias="metaKeywords" /><data alias="umbracoUrlName" /><data alias="umbracoUrlAlias" /><data alias="umbracoRedirect" /><data alias="umbracoInternalRedirectId" /><data alias="umbracoNaviHide">0</data><data alias="hideInFooter">0</data><data alias="contentPageTitle"> </data><node id="1134" version="31037cfa-024b-4fb9-9f63-22fd462e00b0" parentID="1139" level="4" writerID="0" creatorID="0" nodeType="1131" template="0" sortOrder="0" createDate="2010-04-29T07:47:06" updateDate="2010-05-16T17:34:03" nodeName="Microsoft" urlName="microsoft" writerName="Administrator" creatorName="Administrator" nodeTypeAlias="CustomerItem" path="-1,1064,1089,1139,1134"><data alias="customerName"></data><data alias="customerDetail">
    &lt;p&gt; . ,
    - . ,
    , .&lt;/p&gt;
    </data><data alias="customerLogo">1137</data><data alias="metaDescription" /><data alias="metaKeywords" /><data alias="umbracoUrlName" /><data alias="umbracoUrlAlias" /><data alias="umbracoRedirect" /><data alias="umbracoInternalRedirectId" /><data alias="umbracoNaviHide">0</data><data alias="hideInFooter">0</data><data alias="contentPageTitle"></data></node><node id="1142" version="fd185853-78d6-44e9-8866-dcb2362924b5" parentID="1139" level="4" writerID="0" creatorID="0" nodeType="1131" template="0" sortOrder="1" createDate="2010-05-03T12:07:19" updateDate="2010-05-12T13:02:03" nodeName="Adobe" urlName="adobe" writerName="Administrator" creatorName="Administrator" nodeTypeAlias="CustomerItem" path="-1,1064,1089,1139,1142"><data alias="customerName"></data><data alias="customerDetail">
    &lt;p&gt; . ,
    - . ,
    , .&lt;/p&gt;
    </data><data alias="customerLogo">1137</data><data alias="metaDescription" /><data alias="metaKeywords" /><data alias="umbracoUrlName" /><data alias="umbracoUrlAlias" /><data alias="umbracoRedirect" /><data alias="umbracoInternalRedirectId" /><data alias="umbracoNaviHide">0</data><data alias="hideInFooter">0</data><data alias="contentPageTitle"></data></node><node id="1135" version="61594a4f-bbf9-4b6c-bf67-9ee2a04952c0" parentID="1139" level="4" writerID="0" creatorID="0" nodeType="1131" template="0" sortOrder="2" createDate="2010-04-29T07:47:14" updateDate="2010-05-17T03:50:15" nodeName="Apple" urlName="apple" writerName="Administrator" creatorName="Administrator" nodeTypeAlias="CustomerItem" path="-1,1064,1089,1139,1135"><data alias="customerName"></data><data alias="customerDetail">
    &lt;p&gt; . ,
    - . ,
    , .&lt;/p&gt;
    </data><data alias="customerLogo">1137</data><data alias="metaDescription" /><data alias="metaKeywords" /><data alias="umbracoUrlName" /><data alias="umbracoUrlAlias" /><data alias="umbracoRedirect" /><data alias="umbracoInternalRedirectId" /><data alias="umbracoNaviHide">0</data><data alias="hideInFooter">0</data><data alias="contentPageTitle"></data></node></node><node id="1140" version="8a0307e8-0c18-474f-b0ff-801d043906eb" parentID="1089" level="3" writerID="0" creatorID="0" nodeType="1122" template="1123" sortOrder="2" createDate="2010-05-01T04:15:19" updateDate="2010-05-18T08:56:27" nodeName="Testimonials" urlName="testimonials" writerName="Administrator" creatorName="Administrator" nodeTypeAlias="Testimonials" path="-1,1064,1089,1140"><data alias="bodyHeader"> ?.</data><data alias="bodyText">
    &lt;p&gt; , .
    . . ,
    .
    , , .&lt;/p&gt;
    </data><data alias="metaDescription"> ! : 054-2104770 </data><data alias="metaKeywords" /><data alias="umbracoUrlName" /><data alias="umbracoUrlAlias" /><data alias="umbracoRedirect" /><data alias="umbracoInternalRedirectId" /><data alias="umbracoNaviHide">0</data><data alias="hideInFooter">0</data><data alias="contentPageTitle"></data><node id="1127" version="c9125070-e0ea-4ed4-888e-bd6cf76b49ca" parentID="1140" level="4" writerID="0" creatorID="0" nodeType="1121" template="0" sortOrder="1" createDate="2010-04-28T21:42:01" updateDate="2010-05-12T09:58:50" nodeName="Microsoft" urlName="microsoft" writerName="Administrator" creatorName="Administrator" nodeTypeAlias="TestimonyItem" path="-1,1064,1089,1140,1127"><data alias="nameAndCompany"> , ", </data><data alias="testimony">
    &lt;p&gt; , .
    . . ,
    .
    , , .&lt;/p&gt;
    </data><data alias="metaDescription" /><data alias="metaKeywords" /><data alias="umbracoUrlName" /><data alias="umbracoUrlAlias" /><data alias="umbracoRedirect" /><data alias="umbracoInternalRedirectId" /><data alias="umbracoNaviHide">0</data><data alias="hideInFooter">0</data><data alias="contentPageTitle"></data></node><node id="1128" version="5757a105-35fe-40a0-bb27-cab160a3d62a" parentID="1140" level="4" writerID="0" creatorID="0" nodeType="1121" template="0" sortOrder="2" createDate="2010-04-28T21:43:09" updateDate="2010-05-12T09:59:26" nodeName="Apple" urlName="apple" writerName="Administrator" creatorName="Administrator" nodeTypeAlias="TestimonyItem" path="-1,1064,1089,1140,1128"><data alias="nameAndCompany"> ', ", </data><data alias="testimony">
    &lt;p&gt; , .
    . . ,
    .
    , , .&lt;/p&gt;
    </data><data alias="metaDescription" /><data alias="metaKeywords" /><data alias="umbracoUrlName" /><data alias="umbracoUrlAlias" /><data alias="umbracoRedirect" /><data alias="umbracoInternalRedirectId" /><data alias="umbracoNaviHide">0</data><data alias="hideInFooter">0</data><data alias="contentPageTitle"></data></node></node></node><node id="1092" version="57c5a6b4-df24-4df8-9425-44ee31bc209e" parentID="1064" level="2" writerID="0" creatorID="0" nodeType="1090" template="1091" sortOrder="4" createDate="2010-04-21T02:56:26" updateDate="2010-05-18T09:05:16" nodeName="Gallery" urlName="gallery" writerName="Administrator" creatorName="Administrator" nodeTypeAlias="Gallery" path="-1,1064,1092"><data alias="galleryItems"><items><item><data alias="image">1151</data><data alias="imageHeader"> </data><data alias="imageTitle"> | : </data></item><item><data alias="image">1152</data><data alias="imageHeader"> </data><data alias="imageTitle"> | : </data></item><item><data alias="image">1153</data><data alias="imageHeader"> </data><data alias="imageTitle"> | : </data></item><item><data alias="image">1154</data><data alias="imageHeader"> </data><data alias="imageTitle"> | : </data></item><item><data alias="image">1155</data><data alias="imageHeader"> </data><data alias="imageTitle"> | : " </data></item><item><data alias="image">1156</data><data alias="imageHeader"> </data><data alias="imageTitle"> - | : " </data></item><item><data alias="image">1157</data><data alias="imageHeader"> </data><data alias="imageTitle"> | : </data></item><item><data alias="image">1158</data><data alias="imageHeader"> </data><data alias="imageTitle"> | : </data></item><item><data alias="image">1159</data><data alias="imageHeader"> </data><data alias="imageTitle"> - | : </data></item><item><data alias="image">1160</data><data alias="imageHeader">""</data><data alias="imageTitle"> . "" | : </data></item><item><data alias="image">1161</data><data alias="imageHeader"> </data><data alias="imageTitle"> | : </data></item><item><data alias="image">1162</data><data alias="imageHeader"> </data><data alias="imageTitle"> . - | : </data></item><item><data alias="image">1163</data><data alias="imageHeader"> </data><data alias="imageTitle"> </data></item><item><data alias="image">1164</data><data alias="imageHeader"> </data><data alias="imageTitle"> | : 90</data></item><item><data alias="image">1165</data><data alias="imageHeader"> </data><data alias="imageTitle"> , | : </data></item><item><data alias="image">1166</data><data alias="imageHeader"> </data><data alias="imageTitle"> | : </data></item><item><data alias="image">1167</data><data alias="imageHeader"> </data><data alias="imageTitle"> </data></item></items></data><data alias="metaDescription"> . : 054-2104770</data><data alias="metaKeywords" /><data alias="umbracoUrlName" /><data alias="umbracoUrlAlias" /><data alias="umbracoRedirect" /><data alias="umbracoInternalRedirectId" /><data alias="umbracoNaviHide">0</data><data alias="hideInFooter">0</data><data alias="contentPageTitle"></data></node><node id="1111" version="14b6b230-f9a8-4c4a-a842-fb2865d6d947" parentID="1064" level="2" writerID="0" creatorID="0" nodeType="1109" template="1110" sortOrder="5" createDate="2010-04-27T10:14:57" updateDate="2010-05-18T09:05:27" nodeName="Our Tours" urlName="our-tours" writerName="Administrator" creatorName="Administrator" nodeTypeAlias="Tours" path="-1,1064,1111"><data alias="bodyHeader"> </data><data alias="bodyText">
    &lt;p&gt; ,
    , . , .
    - ? .&lt;/p&gt;

    &lt;h3&gt;&lt;img src="/media/assets/services-icon1.jpg" class="imgright"/&gt; &lt;/h3&gt;

    &lt;p&gt; , ,
    . , .
    - ? ..&lt;/p&gt;

    &lt;h3&gt;&lt;img src="/media/assets/services-icon2.jpg" class="imgright"/&gt; &lt;/h3&gt;

    &lt;p&gt; , ,
    . , .
    - ? .&lt;/p&gt;

    &lt;h3&gt;&lt;img src="/media/assets/services-icon3.jpg" class="imgright"/&gt; &lt;/h3&gt;

    &lt;p&gt; , ,
    . , .
    - ? .&lt;/p&gt;
    </data><data alias="metaDescription"> . : 054-2104770</data><data alias="metaKeywords"> , , , , , , , , , , , , </data><data alias="umbracoUrlName" /><data alias="umbracoUrlAlias" /><data alias="umbracoRedirect" /><data alias="umbracoInternalRedirectId" /><data alias="umbracoNaviHide">0</data><data alias="hideInFooter">0</data><data alias="contentPageTitle"> </data><node id="1117" version="6cd41a24-7b04-442a-9cf5-301284ded16c" parentID="1111" level="3" writerID="0" creatorID="0" nodeType="1053" template="1055" sortOrder="1" createDate="2010-04-28T04:32:19" updateDate="2010-05-12T10:11:26" nodeName="Holiday Tours" urlName="holiday-tours" writerName="Administrator" creatorName="Administrator" nodeTypeAlias="ContentPage" path="-1,1064,1111,1117"><data alias="bodyHeader" /><data alias="bodyText"></data><data alias="metaDescription" /><data alias="metaKeywords" /><data alias="umbracoUrlName" /><data alias="umbracoUrlAlias" /><data alias="umbracoRedirect" /><data alias="umbracoInternalRedirectId" /><data alias="umbracoNaviHide">0</data><data alias="hideInFooter">0</data><data alias="contentPageTitle"> </data></node><node id="1118" version="b0879203-1026-4a5c-acf1-e34fa1004290" parentID="1111" level="3" writerID="0" creatorID="0" nodeType="1053" template="1055" sortOrder="2" createDate="2010-04-28T04:32:43" updateDate="2010-05-12T10:11:43" nodeName="Concept Tours" urlName="concept-tours" writerName="Administrator" creatorName="Administrator" nodeTypeAlias="ContentPage" path="-1,1064,1111,1118"><data alias="bodyHeader" /><data alias="bodyText"></data><data alias="metaDescription" /><data alias="metaKeywords" /><data alias="umbracoUrlName" /><data alias="umbracoUrlAlias" /><data alias="umbracoRedirect" /><data alias="umbracoInternalRedirectId" /><data alias="umbracoNaviHide">0</data><data alias="hideInFooter">0</data><data alias="contentPageTitle"> </data></node><node id="1119" version="d652afe8-cbb3-4f8f-bd0c-46e025031675" parentID="1111" level="3" writerID="0" creatorID="0" nodeType="1053" template="1055" sortOrder="3" createDate="2010-04-28T04:33:42" updateDate="2010-05-12T10:12:09" nodeName="VIP Tours" urlName="vip-tours" writerName="Administrator" creatorName="Administrator" nodeTypeAlias="ContentPage" path="-1,1064,1111,1119"><data alias="bodyHeader" /><data alias="bodyText"></data><data alias="metaDescription" /><data alias="metaKeywords" /><data alias="umbracoUrlName" /><data alias="umbracoUrlAlias" /><data alias="umbracoRedirect" /><data alias="umbracoInternalRedirectId" /><data alias="umbracoNaviHide">0</data><data alias="hideInFooter">0</data><data alias="contentPageTitle"> "</data></node><node id="1120" version="253858e2-e518-45bd-8cef-bdf158e74cdd" parentID="1111" level="3" writerID="0" creatorID="0" nodeType="1053" template="1055" sortOrder="4" createDate="2010-04-28T04:33:57" updateDate="2010-05-12T10:12:30" nodeName="Special Events Tours" urlName="special-events-tours" writerName="Administrator" creatorName="Administrator" nodeTypeAlias="ContentPage" path="-1,1064,1111,1120"><data alias="bodyHeader" /><data alias="bodyText"></data><data alias="metaDescription" /><data alias="metaKeywords" /><data alias="umbracoUrlName" /><data alias="umbracoUrlAlias" /><data alias="umbracoRedirect" /><data alias="umbracoInternalRedirectId" /><data alias="umbracoNaviHide">0</data><data alias="hideInFooter">0</data><data alias="contentPageTitle"> </data></node></node><node id="1114" version="7aeb3a10-777b-448d-b4df-f530a57f213c" parentID="1064" level="2" writerID="0" creatorID="0" nodeType="1112" template="1113" sortOrder="6" createDate="2010-04-27T21:50:30" updateDate="2010-05-18T09:05:44" nodeName="Contact Us" urlName="contact-us" writerName="Administrator" creatorName="Administrator" nodeTypeAlias="Contact" path="-1,1064,1114"><data alias="bodyHeader"> ? !</data><data alias="bodyText">
    &lt;p&gt; , .
    - , .
    , -
    - .
    , ,
    .&lt;/p&gt;
    </data><data alias="thankYouHeaderText"> , .</data><data alias="thankYouMessageText">
    &lt;p&gt; . .&lt;/p&gt;

    &lt;p&gt;,&lt;/p&gt;

    &lt;p&gt; .&lt;/p&gt;
    </data><data alias="emailTo">info@tammytsadok.co.il</data><data alias="emailBody">Hello a user of your site has filled in your contact form on [Date] @ [Time]

    Name: [Name]
    Subject: [Subject]
    Email: [Email]
    Message: [Message]</data><data alias="emailReplyFrom">info@tammytsadok.co.il</data><data alias="emailReplySubject">Thank you for your message</data><data alias="emailReplyBody">Hello [Name]
    Thanks for contacting us, we will reply shortly.

    Your Company Name
    www.yourcompany.co.uk</data><data alias="enableSSL">0</data><data alias="metaDescription"> . : 054-2104770</data><data alias="metaKeywords" /><data alias="umbracoUrlName" /><data alias="umbracoUrlAlias" /><data alias="umbracoRedirect" /><data alias="umbracoInternalRedirectId" /><data alias="umbracoNaviHide">0</data><data alias="hideInFooter">0</data><data alias="contentPageTitle"> </data></node><node id="1178" version="0f02842c-ed6d-4e3a-911e-c65d543ea806" parentID="1064" level="2" writerID="0" creatorID="0" nodeType="1175" template="1174" sortOrder="7" createDate="2010-05-19T18:30:29" updateDate="2010-05-19T18:31:27" nodeName="SiteMap" urlName="sitemap" writerName="Administrator" creatorName="Administrator" nodeTypeAlias="CultivSearchEngineSitemap" path="-1,1064,1178"><data alias="umbracoNaviHide">1</data></node></node></textarea> -->

  • Eran 292 posts 436 karma points
    May 20, 2010 @ 12:05
    Eran
    0

    all the bizzar signs are the hebrew that dont displayed correctly at the post..

  • Eran 292 posts 436 karma points
    May 21, 2010 @ 14:02
    Eran
    0

    anyone can help?

  • Hundebol 167 posts 314 karma points
    May 21, 2010 @ 14:16
    Hundebol
    1

    Hi Eran!

    Try this xslt - paste it in your CultivSearchEngineSitemap.xslt instead of the one you have.

    // best regards
    hundebol


    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
    <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:tagsLib="urn:tagsLib" xmlns:BlogLibrary="urn:BlogLibrary"
        exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets tagsLib BlogLibrary ">

    <xsl:output method="xml" omit-xml-declaration="yes"/>

    <xsl:param name="currentPage"/>
      <xsl:variable name="urlPrefix">
        <xsl:text>http://</xsl:text>;
        <xsl:value-of select="umbraco.library:RequestServerVariables('HTTP_HOST')" />
      </xsl:variable>

    <!-- update this variable on how deep your site map should be -->
    <xsl:variable name="maxLevelForSitemap" select="6"/>
    <xsl:variable name="url" select="concat('http://',umbraco.library:RequestServerVariables('HTTP_HOST'))" />

    <xsl:template match="/">
     <!-- change the mimetype for the current page to xml -->
     <xsl:value-of select="umbraco.library:ChangeContentType('text/xml')"/>


    <!--
                ====================================================
                This <URL> node is for the homepage/root page
                ====================================================
                -->
                <url>
                    <loc>
                        <xsl:value-of select="concat($url,'/')"/>
                    </loc>
                    <lastmod>
                        <xsl:value-of select="concat($currentPage/ancestor-or-self::node [@level=1]/@updateDate,'+00:00')" />
                    </lastmod>
                </url>



     <xsl:call-template name="drawNodes"> 
       <xsl:with-param name="parent" select="$currentPage/ancestor-or-self::node [@level=1]"/> 
      </xsl:call-template>
    <!-- </urlset> -->
    </xsl:template>

    <xsl:template name="drawNodes">
     <xsl:param name="parent"/>
     <xsl:if test="umbraco.library:IsProtected($parent/@id, $parent/@path) = 0 or (umbraco.library:IsProtected($parent/@id, $parent/@path) = 1 and umbraco.library:IsLoggedOn() = 1)">
      <xsl:for-each select="$parent/node [string(./data [@alias='umbracoNaviHide']) != '1' and @level &lt;= $maxLevelForSitemap]">

       <!-- If the document does not have a template, nothing is shown in the frontend anyway.
            So this is not proper content and should not be in the sitemap -->
       <xsl:if test="@template &gt; 0">
        <url>
         <loc><xsl:value-of select="$urlPrefix" /><xsl:value-of select="umbraco.library:NiceUrl(@id)" /></loc>
         <lastmod><xsl:value-of select="umbraco.library:FormatDateTime(@updateDate, 'yyyy-MM-ddThh:mm:ss+00:00')" /></lastmod>
         <xsl:if test="./data [@alias='searchEngineSitemapChangeFreq'] != ''">
          <changefreq><xsl:value-of select="./data [@alias='searchEngineSitemapChangeFreq']" /></changefreq>
         </xsl:if>
         <xsl:if test="./data [@alias='searchEngineSitemapPriority'] != ''">
          <priority><xsl:value-of select="./data [@alias='searchEngineSitemapPriority']" /></priority>
         </xsl:if>
        </url>
       </xsl:if>

       <xsl:if test="count(./node [string(./data [@alias='umbracoNaviHide']) != '1' and @level &lt;= $maxLevelForSitemap]) ">  
        <xsl:call-template name="drawNodes">   
         <xsl:with-param name="parent" select="."/>   
        </xsl:call-template> 
       </xsl:if>

      </xsl:for-each>
     </xsl:if>
    </xsl:template>

    </xsl:stylesheet>
  • Eran 292 posts 436 karma points
    May 21, 2010 @ 16:23
    Eran
    0

    thanks Hundebol now its works as expected!

  • Hundebol 167 posts 314 karma points
    May 25, 2010 @ 08:52
    Hundebol
    0

    You're welcome!

    The reason why it did not work before, is because this package traverses the tree from level one, whereas your homepage was at level 0.

    I always have my homepage at level 0 (right under "Content") - so i modified the xslt of this great package.


    cheers
    // hundebol

  • Geoff Baldwin 80 posts 100 karma points
    Oct 05, 2010 @ 14:56
    Geoff Baldwin
    0

    Hi,

    I have just downloaded the package  and took the folowing actions:

    renamed the template to Template.

    Created a page called sitemap  based on a Runway TextPage ,using the template and hidden from the navigation.

    If I browse to http://www.jrbp1.com/sitemap.aspx I see a file starting:

    <urlset xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">

    <url>
    <loc>http://www.jrbp1.com/about-james.aspx</loc>;
    <lastmod>2010-10-03T12:32:31+00:00</lastmod>
    </url>

    I assume this means that my home page is not included as per the first post in this thread.

    My content looks like this:

    Content
        Runway Homepage
              About...
              Galleries
                   Gallery1
                   Gallery2....
               Content

    Picking up this older thread.I tried the solution of using the modified xslt file but got the following error when I tried to save it:

    (I tried ignoring the error but got an invalid file and temporaralily lost my development section!)

    Error occured

    System.OverflowException: Value was either too large or too small for an Int32.
    at System.Convert.ToInt32(Double value)
    at System.Double.System.IConvertible.ToInt32(IFormatProvider provider)
    at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
    at System.Xml.Xsl.Runtime.XmlQueryRuntime.ChangeTypeXsltArgument(XmlQueryType xmlType, Object value, Type destinationType)
    at System.Xml.Xsl.Runtime.XmlQueryContext.InvokeXsltLateBoundFunction(String name, String namespaceUri, IList`1[] args)
    at (XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, IList`1 parent)
    at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
    at Execute(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
    at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlSequenceWriter results)
    at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer)
    at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, XmlWriter results, XmlResolver documentResolver)
    at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results)
    at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)

     

     

     

     

  • Axel S 12 posts 33 karma points
    Jan 27, 2011 @ 16:39
    Axel S
    0

    Hi!

    I get the same "System.OverflowException" error when trying Hundebols code. I also get this error when I leave the original code and only change 1 to 0 in this line: <xsl:with-param name="parent" select="$currentPage/ancestor-or-self::*[@level=1]"/> (as suggested in the "issue with 4.6.1" thread).

    I am doing some changes on an Umbraco site where the home page is level 0, and don't have enough Umbraco skills to get it to work. If someone can take a look, I will be super happy! =)

  • Sebastiaan Janssen 4847 posts 14391 karma points MVP admin hq
    Jan 28, 2011 @ 08:39
    Sebastiaan Janssen
    0

    How about if you remove: [@level=1] entirely?

  • Andy Vennells 19 posts 59 karma points
    May 20, 2016 @ 01:25
    Andy Vennells
    0

    The code posted by Hundebol did not work for me, but I used some of his code to fix mine. This is what I ended up with

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [
      <!ENTITY nbsp "&#x00A0;">
    ]>
    <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"/>
    
      <xsl:variable name="urlPrefix">
        <xsl:text>http://</xsl:text>;
        <xsl:value-of select="umbraco.library:RequestServerVariables('HTTP_HOST')" />
      </xsl:variable>
    
      <!-- update this variable on how deep your site map should be -->
      <xsl:variable name="maxLevelForSitemap" select="100"/>
      <xsl:variable name="url" select="concat('http://',umbraco.library:RequestServerVariables('HTTP_HOST'))" />
      <xsl:template match="/">
        <!-- change the mimetype for the current page to xml -->
        <xsl:value-of select="umbraco.library:ChangeContentType('text/xml')"/>
    
        <url>
          <loc>
            <xsl:value-of select="concat($url,'/')"/>
          </loc>
          <lastmod>
            <xsl:value-of select="concat($currentPage/ancestor-or-self::node [@level=1]/@updateDate,'+00:00')" />
          </lastmod>
        </url>
    
    
        <xsl:call-template name="drawNodes">
          <xsl:with-param name="parent" select="$currentPage/ancestor-or-self::*[@level=1]"/>
        </xsl:call-template>
      </xsl:template>
    
      <xsl:template name="drawNodes">
        <xsl:param name="parent"/>
        <xsl:if test="umbraco.library:IsProtected($parent/@id, $parent/@path) = 0 
                or (umbraco.library:IsProtected($parent/@id, $parent/@path) = 1 and umbraco.library:IsLoggedOn() = 1)
                and @level &lt;= $maxLevelForSitemap ">
          <xsl:for-each select="$parent/* [@isDoc and string(hideFromSitemap) != '1']">
            <!-- If the document does not have a template, nothing is shown in the frontend anyway.
            So this is not proper content and should not be in the sitemap -->
            <xsl:if test="@template &gt; 0">
              <url>
                <loc>
                  <xsl:value-of select="$urlPrefix" />
                  <xsl:value-of select="umbraco.library:NiceUrl(@id)" />
                </loc>
                <lastmod>
                  <xsl:value-of select="umbraco.library:FormatDateTime(@updateDate, 'yyyy-MM-ddTHH:mm:ss+00:00')" />
                </lastmod>
                <xsl:if test="./data [@alias='searchEngineSitemapChangeFreq'] != '' or searchEngineSitemapChangeFreq != ''">
                  <changefreq>
                    <xsl:value-of select="./data [@alias='searchEngineSitemapChangeFreq'] | searchEngineSitemapChangeFreq" />
                  </changefreq>
                </xsl:if>
                <xsl:if test="./data [@alias='searchEngineSitemapPriority'] != '' or searchEngineSitemapPriority != ''">
                  <priority>
                    <xsl:value-of select="./data [@alias='searchEngineSitemapPriority'] | searchEngineSitemapPriority" />
                  </priority>
                </xsl:if>
              </url>
            </xsl:if>
    
            <xsl:if test="(count(./* [@isDoc and string(hideFromSitemap) != '1' and @level &lt;= $maxLevelForSitemap]) &gt; 0) or (count(./node [string(./data [@alias='hideFromSitemap']) != '1' and @level &lt;= $maxLevelForSitemap]) &gt; 0)">
              <xsl:call-template name="drawNodes">
                <xsl:with-param name="parent" select="."/>
              </xsl:call-template>
            </xsl:if>
    
          </xsl:for-each>
        </xsl:if>
      </xsl:template>
    </xsl:stylesheet>
    
  • Mark 8 posts 110 karma points
    Dec 19, 2016 @ 18:08
    Mark
    0

    Hi,

    I know this is a bit old but I'm having the same issues and have replaced the code with both of the items above but still the homepage doesn't show.

    tree layout is:

    Content - site 1 - page 1 - page 2 - site 2 - page 1 - page 2

    etc. I would happily have another page in between Content and site 1 and 2 however I've no idea what would go in that page??

    Either way, if I can just get the hompage to show, that would be amazing!

Please Sign in or register to post replies

Write your reply to:

Draft