Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

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

Adding Hyperlink to another site from SilverStripe


Reply


17 Posts   2047 Views

Avatar
Sue

Community Member, 26 Posts

26 July 2011 at 5:16am

Edited: 26/07/2011 5:24am

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/

Avatar
zenmonkey

Community Member, 532 Posts

26 July 2011 at 5:23am

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

Avatar
Sue

Community Member, 26 Posts

26 July 2011 at 5:29am

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

Sue

Avatar
Sue

Community Member, 26 Posts

26 July 2011 at 5:32am

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

Sue

Avatar
zenmonkey

Community Member, 532 Posts

26 July 2011 at 5:59am

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

Avatar
Sue

Community Member, 26 Posts

26 July 2011 at 6:06am

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

Avatar
zenmonkey

Community Member, 532 Posts

26 July 2011 at 6:15am

Heres a video on it. :)

http://www.youtube.com/watch?v=wdFeFIPEr5c

Avatar
Sue

Community Member, 26 Posts

26 July 2011 at 6:22am

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