Page 1 of 1

[Solved] cgblog return link

Posted: Sun Jan 10, 2010 12:56 pm
by Elise
Hi all,

On my CGBlog detail page I'm trying to get a link back to my summary page.
When the link is clicked I would very much like the user to get back to the list of summaries, but not showing the top of the page, but showing the topic he/she was reading.
Return to newsindex is not an option because I also have previous/next buttons on my detail page, so the user could come straight from an other detail page.
I tried Return to newsindex, but this doesn't work, maybe because of pretty urls?

I use cmsms 1.6.6, CGBlog 1.3.1, CGExtensions 1.17.6 and CGSimpleSmarty 1.4.3.

Thanks in advance for anyone willing to help.

Re: cgblog return link

Posted: Sun Jan 10, 2010 5:15 pm
by Dr.CSS
CGBlog was build from news and the return link seems to have been taken out of it, but even the News return link only took you back to where you came from not to a specific/different page, if you always want them to return to a set page just put a link to it in the detail template...

Re: cgblog return link

Posted: Sun Jan 10, 2010 7:35 pm
by Elise
I found an acceptable solution in this Javascript:

Code: Select all

<__script__ language="JavaScript" type="text/javascript">
if   (document.referrer == "news.html")
{ 
document.write('<a href="javascript:history.go(-1)">Return to newsindex</a>');
}
else
{
var str = "Return to newsindex";
document.write(str.link("news.html"));
}
</__script>  


Re: [Solved] cgblog return link

Posted: Mon Jan 11, 2010 5:57 pm
by Dr.CSS
Wouldn't that be the same as Return to newsindex ?...

Re: [Solved] cgblog return link

Posted: Mon Mar 08, 2010 11:19 am
by Elise
Dr.CSS wrote: Wouldn't that be the same as Return to newsindex ?...
No, I don't think anyone understands me  ;D

With just linking to news.html you will get to the top of the page.
If the user was at the bottom of the list I would like to have the user return to the bottom, if he was at the top I would like him to return to the top.