[pmwiki-users] Idea for trail link to trail page

Waylan Limberg waylan at gmail.com
Tue Dec 20 14:05:47 CST 2005


On 12/20/05, christian.ridderstrom at gmail.com
<christian.ridderstrom at gmail.com> wrote:
> Hi
>
> Here's an idea. Let's assume you're currently on a page in trail and you
> click on the trail link (i.e. the one that puts you on the trail page).
> What if the trail link would also specify an anchor that has been
> automatically generated, so that you get to se the page from which you
> came?
>
> The reason I thought of this was that I just went to a trail page via a
> trail link, and because there were so many pages in the trail it was
> difficult to know from where I'd come.
>
> Thoughts? Does this make sense?
>
I suppose this is possible (sort of). The browser will (sometimes)
send the referring page in the HTTP Referrer Header which is available
to as a PHP Global Variable. One could grab that and somehow find a
matching link on the current page and set a class for css styling or
something of the sort. However, not every browser will return the HTTP
Referrer Header, so the result will be spotty in execution. For
instance, the firewall I'm behind here as work strips the header on
all outgoing requests, so it'll never work for me. Of course, you do
it anyway, just wrap the code in a check for the variable and tell
people like myself "too bad."


--
----
Waylan Limberg
waylan at gmail.com




More information about the pmwiki-users mailing list