jorge_molinaalb
I'm new here

New page (sitemap) created but unaccessible

Jump to solution

Hi people!

366996_pastedImage_4.png

I have the following problem, in the preview I only see those text in the right...

And, I don't know how can I see that in live mode.. I mean, the path (link), for example:

www.example.com/firstFolder/sitemap_xml

www.example.com/firstFolder/sitemap_xml.php

www.example.com/firstFolder/sitemap_xml.xml

don't work...

Thanks.

More Details:

Server version: 5.2.200607.79090 (I)

Template content:

<CMS_HEADER> 

 

  <CMS_FUNCTION name="Navigation" resultname="sitemap"> 

        <CMS_PARAM name="expansionVisibility" value="all"/> 

        <CMS_PARAM name="wholePathSelected" value="0"/> 

        <CMS_PARAM name="siteMap" value="1"/> 

        <CMS_ARRAY_PARAM name="pageRefRendering"> 

            <CMS_ARRAY_ELEMENT index="0..10"><![CDATA[ 

                $CMS_IF(!#nav.ref.getPageLangSpec(#global.language).useExternalUrl())$ 

                    $CMS_IF(#nav.ref.getMultiPageParams(#global.language, #global.templateSet).getPageCount() > 1 && !#nav.ref.getMultiPageParams(#global.language, #global.templateSet).getData().isEmpty)$ 

                        $CMS_FOR(multiPage, #nav.ref.getMultiPageParams(#global.language, #global.templateSet).getData())$ 

                            <url> 

                                <loc>$CMS_VALUE(ref(#nav.ref, abs:1, contentId:multiPage.getId()).url.toString().split("/").map(x->x.urlEncode).toString("/"))$</loc> 

                                <lastmod>$CMS_VALUE(multiPage.getLastChange().format("yyyy-MM-dd'T'HH:mm:ssZ").substring(0, 22)+":00")$</lastmod>

                            </url> 

                        $CMS_END_FOR$ 

                    $CMS_ELSE$  

                        <url> 

                            <loc>$CMS_VALUE(ref(#nav.ref, abs:1).url.toString().split("/").map(x->x.urlEncode).toString("/"))$</loc> 

                            <lastmod>$CMS_VALUE(#nav.ref.page.changeDate().format("yyyy-MM-dd'T'HH:mm:ssZ").substring(0, 22)+":00")$</lastmod>

                        </url> 

                    $CMS_END_IF$ 

                $CMS_END_IF$ 

            ]]></CMS_ARRAY_ELEMENT> 

        </CMS_ARRAY_PARAM> 

    </CMS_FUNCTION>

</CMS_HEADER><?xml version="1.0" encoding="UTF-8"?> 

<urlset xmlns="http://www.google.com/schemas/sitemap/0.9"> 

$CMS_VALUE(sitemap)$

</urlset>

0 Kudos
1 Solution

Accepted Solutions
hoebbel
Crownpeak employee

Hello Jorge,

I assume that you have selected html as the ending in the page template. This will cause the browser to preview the page as html - and only show the contents that are not in XML tags.

Just change the target ext. to xml (or txt), then the XML tags will be displayed as well.

372884_pastedImage_0.png

The page will not be visible in the Live Stand until a corresponding publication has taken place. How this is done is project specific, so I can't say anything about it based on the available information.

Many greetings

Holger

View solution in original post

0 Kudos
2 Replies
hoebbel
Crownpeak employee

Hello Jorge,

I assume that you have selected html as the ending in the page template. This will cause the browser to preview the page as html - and only show the contents that are not in XML tags.

Just change the target ext. to xml (or txt), then the XML tags will be displayed as well.

372884_pastedImage_0.png

The page will not be visible in the Live Stand until a corresponding publication has taken place. How this is done is project specific, so I can't say anything about it based on the available information.

Many greetings

Holger

0 Kudos

thanks!! The only left thing is to know if should be this the right sintax (picture) ??

I mean, <loc> has no the domain web..

373246_pastedImage_0.png

0 Kudos