Jump to content


Links On This Page Snippet


  • You cannot reply to this topic
1 reply to this topic

#1 lloyd_borrett

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 605 posts
  • Gender:Male

Posted 23 April 2006 - 11:45 AM

G'day,

I was wondering if anyone has a "Links On This Page" snippet.

That is, a snippet that reads through the content of a page and builds a list of the anchor tags with id attributes on the page. That is tags of the form:
<a id="xxxx" title="Link A"></a>

It would then use the id and title attributes to output a list of links where each link took the form:

<a href="#xxxx">Link A</a>

That is, build a "Links On This Page" list of links automatically.

It would be such a useful thing to have. I wouldn't know where to begin to write such a snippet. I'm hoping someone else may have already done it.

Best Regards, Lloyd.

#2 PaulD

    Likes Etomite Forums!

  • Developers
  • PipPip
  • 398 posts
  • Gender:Male

Posted 23 April 2006 - 12:03 PM

lloyd_borrett, on Apr 23 2006, 12:45 PM, said:

It would be such a useful thing to have.

I agree, it would.

lloyd_borrett, on Apr 23 2006, 12:45 PM, said:

I wouldn't know where to begin to write such a snippet.

LOL- Nor would I as am still struggling with the date conversion you mentioned about a previous snippett. However, wouldn't this be impossible because of the self referential nature of the problem.

The snippett would read the code, but part of the code would be a snippett call, that tried to read the code, that tried to run the snippett? etc etc

In fact this would be very useful indeed, but I have never seen it anywhere. A Frame might do it, as then it is on a separate page, and read the code of the content frame only, that didn't contain the snippett.

Sorry I can't be of more help.

Paul





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users