Adding an ID attribute to all headers in content
Posted: Mon Mar 02, 2009 11:04 am
i have something in my mind but i dont know how to solve it.
i would like to parse the whole content and add an id attribute to all headers (no matter what type of (h1, h2, ...)) before content is displayed. i dont want to do this manually in wysiwyg.
WHY?
because i would like to show a table of contents (like wikipedia) at the beginning of a page and i want to send the parsed content to this udt so that the udt can create links to all headers.
the table of contents udt is the following:
http://wiki.cmsmadesimple.org/index.php ... f_contents
can somebody help me with that?
i would like to parse the whole content and add an id attribute to all headers (no matter what type of (h1, h2, ...)) before content is displayed. i dont want to do this manually in wysiwyg.
WHY?
because i would like to show a table of contents (like wikipedia) at the beginning of a page and i want to send the parsed content to this udt so that the udt can create links to all headers.
the table of contents udt is the following:
http://wiki.cmsmadesimple.org/index.php ... f_contents
can somebody help me with that?