Creating a XML file as output, but page links are written as site://
I an generating a XML file that contains the contents of an index block. It contains a list of all the news items on our site that I am using for Ajax calls and rss feeds.
The links are getting written to the file as
<link>site://ACAD-COMM-news.miami.ed/stories/2015/04/um-alumnus-rubio-runs-for-nations-highest-office</link>
instead of the full URL.
Here are the relevant sections of the format:
## Get all the news items
#set ($xNewsItems = $_XPathTool.selectNodes($contentRoot, "//system-page"))
## loop through all the news items
#foreach ($xNewsItem in $xNewsItems)
## Get the link to the article
#set ($sLink = $_EscapeTool.xml($xNewsItem.getChild("link").value))
<link>$sLink</link>
...
#end
I am attaching a full copy of the format and the index block for reference if needed.
Discussions are closed to public comments.
If you need help with Cascade CMS please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Ryan Griffith on 16 Apr, 2015 01:09 PM
Hi,
It sounds as though Cascade is not tracking the links. When you have a moment, try surrounding the value of the link with
[system-asset]
pseudo tags and re-publish. For example:Please let me know if you have any questions.
Thanks!
2 Posted by ediego on 16 Apr, 2015 01:28 PM
That helped a little, its coming out like this now
<link>/stories/2015/04/studying-how-species-evolve.html</link>
Is there anyway to make if the full URL like
<link>http://news.miami.edu/stories/2015/04/studying-how-species-evolve.html</link>
Some of these might be pointing to other sites.
3 Posted by ediego on 17 Apr, 2015 12:52 PM
Any ideas on if its possible to get the full URL for these links ?
4 Posted by Ryan Griffith on 17 Apr, 2015 02:17 PM
Hi,
Currently, the only way to accomplish this is to manually append the hostname information onto the front of the link for assets that are within the same Site. Assets from other Sites will have the Site URL appended onto the front automatically.
We do have a couple of related suggestions on our Idea Exchange. I highly recommend voting them up if you would like to see any of them implemented in a future release.
A workaround clients have used is to name their Sites based on the domain and append
http://
and the Site name onto the front. For example, if you were to name the Sitenews.miami.edu
you could do something like the following:Please let me know if you have any questions.
Thanks!
5 Posted by ediego on 19 Apr, 2015 12:32 AM
ok, thanks.
6 Posted by Ryan Griffith on 20 Apr, 2015 11:54 AM
Not a problem at all, my apologies for not being able to provide a simple solution. Definitely vote up those suggestions if you would like to see them implemented.
I'm going to go ahead and close this discussion, please feel free to comment or reply to re-open if you have any additional questions.
Have a great day!
Ryan Griffith closed this discussion on 20 Apr, 2015 11:54 AM.