Jump to:

23461 Posts in 18908 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Adding Hyperlink to another site from SilverStripe

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2 3
Go to End
Author Topic: 1799 Views
  • Sue
    Avatar
    Community Member
    26 Posts

    Re: Adding Hyperlink to another site from SilverStripe Link to this post

    Here is the link to the site I am working on http://tlmlandscaping.com.c11.previewyoursite.com/ You can see that the link to the photo gallery is added to the top navigation -this is great. But if you go to the site map (link on the bottom of the page) I have found two problems. The first is the question I was asking a short time ago. How do I add a link to the site map text in the body of the page (if possible) AND - now that I looked closer the link to the photo gallery that is appearing on most of the pages in the top navigation is not showing up on the site map page NOR is it on the testimonials page. This seems weird to me - shouldn't the theme nagivation.ss affect all of the pages in the site.

    So this is now 2 questions - adding the link to the body of the site map and

    adding the link to the top navigation of all pages in the site including site map and testimonials

    Thanks!
    Sue

    PS also missing on http://tlmlandscaping.com.c11.previewyoursite.com/careers/

  • zenmonkey
    Avatar
    Community Member
    528 Posts

    Re: Adding Hyperlink to another site from SilverStripe Link to this post

    You can make a copy of your GoogleSitemap.ss and put it your themes directory. Just add the an entry for the the new link outs is the Items control. Realistically it may be more flexible if you go the redirector route

  • Sue
    Avatar
    Community Member
    26 Posts

    Re: Adding Hyperlink to another site from SilverStripe Link to this post

    I really appreciate your help but I don't understand.

    Sue

  • Sue
    Avatar
    Community Member
    26 Posts

    Re: Adding Hyperlink to another site from SilverStripe Link to this post

    I found the googlesitemap.ss - but what are referring to as Item control

    Sue

  • zenmonkey
    Avatar
    Community Member
    528 Posts

    Re: Adding Hyperlink to another site from SilverStripe Link to this post

    Your GoogleSitemap.ss should look like this

    <?xml version="1.0" encoding="UTF-8"?>
    <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
       <% control Items %>
       <url>
          <loc>$AbsoluteLink</loc>
          <lastmod>$LastEdited.Format(c)</lastmod>
          <% if ChangeFreq %><changefreq>$ChangeFreq</changefreq><% end_if %>
          <% if Priority %><priority>$Priority</priority><% end_if %>
       </url>
       <% end_control %>
       <url>
          <loc>http://gallery.tlmlandscaping.com</loc>;
          <lastmod>2011-07-26T13:56:31-04:00</lastmod>
          <changefreq>monthly</changefreq>
          <priority>1</priority>
       </url>
    </urlset>

    Unfortunately there's no way to add a current lastmod date unless Gallery has a a function you can call from an external site to check (never did any coding with Gallery). Which is possible another reason for using the redirector page instead of hard coding, you can always resave the page to update the lastmod

    Make sure you put this in the root of the template of the template directory with the main Page.ss

  • Sue
    Avatar
    Community Member
    26 Posts

    Re: Adding Hyperlink to another site from SilverStripe Link to this post

    I will try that (thanks) went the back up of the site is complete (don't want to loose what I have). Can you point me to information on the redirector page you mentioned - I'm not sure how I would make that work.

    Sue

  • zenmonkey
    Avatar
    Community Member
    528 Posts
  • Sue
    Avatar
    Community Member
    26 Posts

    Re: Adding Hyperlink to another site from SilverStripe Link to this post

    That looks much better for what I need - I can then add that link to the navigation, right. DUH this should solve all the problems! I'll try in a few minutes. (really appreciate the video)

    Sue

    1799 Views
Page: 1 2 3
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.