"auto navigation" not publishing to correct url

lauren.fraser's Avatar

lauren.fraser

19 May, 2015 08:38 PM

We're working on a development site at http://www.citizensmemorial.com/Test2014/index.html

On some pages we're using a folder index to auto generate the navigation. It seems to be working properly, but when you click on the link it's looking to www.citizensmemorial.com instead of www.citizensmemorial.com/Test2014

Sample page using auto-nav http://www.citizensmemorial.com/Test2014/specialties/birth-place/in...
If you click on one of the links on this page it takes you to something like this: http://www.citizensmemorial.com/specialties/birth-place/patient-res...

We have the site url set to: http://www.citizensmemorial.com/Test2014 and individual pages publish correctly.

The transport Server Directory is set to wwwroot/Test2014
Destination web url is set to http://www.citizensmemorial.com/Test2014

Our breadcrumbs are working correctly, so I'm thinking it is something in my format that is creating the incorrect links.

#set ($folderPages = $_XPathTool.selectNodes($contentRoot, "/system-index-block/system-page[name != 'index']"))
#set ($folderName = $_XPathTool.selectSingleNode($contentRoot, "/system-index-block/calling-page/system-page/system-data-structure/folder-name"))
<div class="nav-main">
<div class="main">
<div class="mobile-nav"><a class="mobile-toggle" href="javascript:void(0)"><img alt="menu-bg" src="/render/file.act?path=/_common/images/page-layout/menu-small.png" />Menu</a></div>
<div class="navigation">
<ul class="mobile-menu">

#foreach ($folderPage in $folderPages)
    #set ($folderTitle = $folderPage.getChild("title"))
    #set ($folderPath = $folderPage.getChild("link").value)
    <li class="p1"><b>&#160;</b><a href="{$folderPath}">$_EscapeTool.xml($folderTitle.value)</a></li>
    
#end
<li></li>
</ul>
</div>
</div>
</div>
  1. 1 Posted by Ryan Griffith on 20 May, 2015 01:09 PM

    Ryan Griffith's Avatar

    Hi Lauren,

    Looking at the source code of the published page you provided, it appears the page is configured to use absolute links instead of relative. This would explain why the Test2014 sub-directory is being removed, because the absolute URL would start at the root of www.citizensmemorial.com as opposed to the sub-folder.

    When you have a moment, please confirm if this is the case by:

    • Editing one of your pages (eg specialties/birth-place/index)
    • Go to the **System* pane
    • Verify if the Maintain absolute links option is checked

    If it is checked, try unchecking the option and republishing the page to see if that resolves the issue. If it does resolve your issue, repeat these steps for the remainder of the affected pages.

    Please let me know if you have any questions.

    Thanks!

  2. 2 Posted by lauren.fraser on 20 May, 2015 01:22 PM

    lauren.fraser's Avatar

    Ryan,

    The “maintain absolute links” box wasn’t checked on these pages.

     

    We are using a folder index – could it be something with one of the settings in that index block?

  3. 3 Posted by Ryan Griffith on 20 May, 2015 01:30 PM

    Ryan Griffith's Avatar

    Ah, my apologies Lauren. One thing I over looked with those links within the page's source code is the fact that they don't have file extensions on them. This indicates that Cascade is not tracking and rewriting the links on publish. That would explain why the links appeared to be absolute.

    When you have a moment, adjust your Format to the following, republish, and let me know how it works out:

    #set ($folderPages = $_XPathTool.selectNodes($contentRoot, "/system-index-block/system-page[name != 'index']"))
    #set ($folderName = $_XPathTool.selectSingleNode($contentRoot, "/system-index-block/calling-page/system-page/system-data-structure/folder-name"))
    <div class="nav-main">
    <div class="main">
    <div class="mobile-nav"><a class="mobile-toggle" href="javascript:void(0)"><img alt="menu-bg" src="[system-asset]/_common/images/page-layout/menu-small.png[/system-asset]" />Menu</a></div>
    <div class="navigation">
    <ul class="mobile-menu">
    
    #foreach ($folderPage in $folderPages)
        #set ($folderTitle = $folderPage.getChild("title"))
        #set ($folderPath = $folderPage.getChild("link").value)
        <li class="p1"><b>&#160;</b><a href="[system-asset]{$folderPath}[/system-asset]">$_EscapeTool.xml($folderTitle.value)</a></li>
        
    #end
    <li></li>
    </ul>
    </div>
    </div>
    </div>
    

    Note: I also noticed the image within your mobile-toggle link was not rewriting either, so I also addressed that as well.

    Please let me know if you have any questions.

    Thanks!

  4. 4 Posted by lauren.fraser on 20 May, 2015 02:01 PM

    lauren.fraser's Avatar

    Ryan,

    That worked. Thanks!

    Lauren

  5. 5 Posted by lauren.fraser on 20 May, 2015 03:07 PM

    lauren.fraser's Avatar

    That worked. Thanks!

  6. 6 Posted by Ryan Griffith on 20 May, 2015 04:35 PM

    Ryan Griffith's Avatar

    Not a problem at all, Lauren, thank you for following up. I am glad to hear the proposed changes did the trick.

    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!

  7. Ryan Griffith closed this discussion on 20 May, 2015 04:35 PM.

  8. lauren.fraser re-opened this discussion on 20 May, 2015 11:20 PM

  9. 7 Posted by lauren.fraser on 20 May, 2015 11:22 PM

    lauren.fraser's Avatar

    Ryan,
    Seems I spoke too soon. I didn't look very closely, but now all the links go to the existing page.
    http://www.citizensmemorial.com/Test2014/specialties/birth-place/in...

  10. 8 Posted by Ryan Griffith on 21 May, 2015 01:31 PM

    Ryan Griffith's Avatar

    Hi Lauren,

    My apologies, it looks like the generated links do not contain a value within the href attribute. I suspect it may be due to this line I provided:

    <li class="p1"><b>&#160;</b><a href="[system-asset]{$folderPath}[/system-asset]">$_EscapeTool.xml($folderTitle.value)</a></li>
    

    When you have a moment, try changing it to the following and let me know if the change fixes the issue:

    <li class="p1"><b>&#160;</b><a href="[system-asset]${folderPath}[/system-asset]">$_EscapeTool.xml($folderTitle.value)</a></li>
    

    Please let me know if you have any questions.

    Thanks!

  11. 9 Posted by lauren.fraser on 21 May, 2015 03:40 PM

    lauren.fraser's Avatar

    Ryan,

    That worked! And I checked it closely this time around ;)

    Thank you!

     

    Lauren

  12. 10 Posted by Ryan Griffith on 21 May, 2015 03:53 PM

    Ryan Griffith's Avatar

    Thank you for following up, Lauren. I am glad to hear the minor adjustment did the trick.

    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!

  13. Ryan Griffith closed this discussion on 21 May, 2015 03:53 PM.

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

 

26 Aug, 2016 01:19 PM
25 Aug, 2016 03:02 PM
25 Aug, 2016 12:50 PM
24 Aug, 2016 08:43 PM
24 Aug, 2016 07:20 PM
21 Aug, 2016 01:20 PM