Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bjarne Fyrstenborg 1282 posts 3994 karma points MVP 8x c-trib
    Jun 28, 2011 @ 12:12
    Bjarne Fyrstenborg
    0

    Link back to newslist page

    I was wondering how I could link back from a news item to the news list with all news listed up.
    Right now I have this in my code that link back to the newslist:

    <href='<umbraco:Item runat="server" field="parentID" xslt="umbraco.library:NiceUrl({0})" />' title="Tilbage til oversigten">&laquo; Tilbage til oversigten</a>

    But as more news items are added to the list and more pages will come, I think it would be better to link back to the actually page the news item is under.
    If the news item is on page 2, it would be nice there was a link back to that page instead of the first page.

    Is there a way I can do this, without using javascript:history.back(-1) or something like that, which not is appropriate when you came from the frontpage or perhaps from Google.

    You can see the newslist here: http://oldengaard.dk/da/nyheder.aspx

    Bjarne

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jun 28, 2011 @ 12:35
    Dirk De Grave
    0

    Several options.. check the url you're coming from on your news detail page or add a querystring parameter so you know what page you were coming from... Probably not the most elegant solutions, but will work.

     

    Cheers,

    /Dirk

  • Bjarne Fyrstenborg 1282 posts 3994 karma points MVP 8x c-trib
    Jun 28, 2011 @ 13:00
    Bjarne Fyrstenborg
    0

    Hi Dirk

    Thanks for you reply.
    Can you perhaps give some more detailed information?

    Some may come to the news item from the frontpage (3 latest news) and some may come from Google. So I think it only should be the newslist page it should be looking at.
    But I don't know how it will work when the user come directly from the frontpage.
    Perhaps there is a way you can check on which page the news item is placed? Then it will be easy the link to that page link to newslist page + ?page=1 , ?page=2 ... etc. 

    Bjarne

Please Sign in or register to post replies

Write your reply to:

Draft