Removing folders without indexes from site-map.
Hi, I'm currently patching one site of many sites, but this particular one has many folders that are included in the website's site-map, that when clicked go to a blank page. Simply, the creator of the site wanted to be more organized and put sub-pages in different folders with no index.
Is there a way I can make the folders not linked, but visible as just text, or even remove the folder entirely and just show the pages inside on the site-map?
This is what I am using: https://github.com/hannonhill/Velocity-Cookbook/blob/master/Sitemap-HTML/sitemap.vm
Thank you.
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 Lisa McWilliams on 28 May, 2015 08:25 PM
Hi Meredith,
The github code you linked to doesn't appear to be linking the folder name, just displaying the text inside an
2 Posted by Meredith on 28 May, 2015 08:28 PM
Here's a small bit of it that includes line 44:
3 Posted by Lisa McWilliams on 28 May, 2015 08:31 PM
Okay, so the version you are using has a link tag wrapped around the output.
All you need to do is change this:
<a href="${folderLoc}">$_EscapeTool.xml($theFolderTitle.value)</a>
to this:
$_EscapeTool.xml($theFolderTitle.value)
And then the folders will show without links.
Let me know if that works out for you.
4 Posted by Meredith on 28 May, 2015 08:33 PM
Yeah, I already did that, but I want some of the folders to be links, just the ones with index.html files in them. Is this possible?
5 Posted by Lisa McWilliams on 28 May, 2015 08:37 PM
Yes, if you change the code to this:
In the first line, in the if statement, it is checking the folder to see if it has any system pages inside of it where the name is index. The [] is like a where clause.Is this what you were looking for?
6 Posted by Meredith on 28 May, 2015 09:00 PM
I might be inserting the code incorrectly, but it's not working.. I get this error:
7 Posted by Lisa McWilliams on 28 May, 2015 09:03 PM
Sorry I was missing a parenthesis to close the #if()
8 Posted by Meredith on 29 May, 2015 12:19 AM
Sorry for the late reply but that worked! Thank you so much! :)
9 Posted by Lisa McWilliams on 29 May, 2015 01:43 PM
You're welcome!
Lisa McWilliams closed this discussion on 29 May, 2015 01:43 PM.