Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
default.sitemap in TS 7.2.1
tik
I'm trying to read the default.sitemap XML document within Teamsite from a Javascript (.js) file through the following piece of code:
var xmlPath = "http://"+window.location.hostname+"/sites/fanniemae/default.sitemap";//absolute XML path
The file cannot be read. However, when I rename the default.sitemap document as for instance default.sitemap.xml try again with the same piece of code (above), everything works and I can read the file.
Could you tell me why?
If possible, could you tell me how to allow the file to be read in it's original name (default.sitemap) within teamsite.
Find more posts tagged with
Comments
Rick Poulin
You can't, because the webapp recognizes that it's an internal file and doesn't allow you to retrieve it from HTTP. When you rename to .xml, that's not a system file so you CAN get it over HTTP. There's an asterisk there for retrieving the file in preview via the /iw-mount/ web share, but that's probably not what you're looking for..
What you should do is write a Java external to retrieve and render the sitemap however you need it. You could even write an external for an AJAX page and have JavaScript grab it from that .page file. (FYI: there's an OOTB external which grabs the sitemap content and feeds it to your component as-is.. you can then <xsl-copy
f select="/Properties/Data/Result/site-map" /> on an XML-type page and voila.. available for AJAX requests..)
What are you trying to accomplish anyway?
tik
Thanks for the response.
We are trying to build a left navigation based on sitemap
We have a left nav component, which calls a javascript file to read the sitemap. This js parses the sitemap.
The left navigation component is used on all our .page files.
Rahul
nipper
Why not use the same method that the OOTB component (JavaScript navigation) uses ?
[php]
com.interwoven.livesite.external.impl.LivesiteSiteMap
[/php]
Then you can use something like this:
select="node[
@visible-in-sitemap=
'true']"
tik
please tell me the OOTB component name thanks
Faizi
please tell me the OOTB component name thanks
You can see below component for Site Map:
/Interwoven/Page Element/Navigation/Horizontal Site Map.component
bar_spaceIssue.rptdesign
tik
thanks very much
Faizi
thanks very much
Welcome tik,
I guess now your query has been solved. So it's better to closed the thread if you feel no need to keep this thread open.
Thanks
pageBreak.PNG