Is there a way to fetch anchor points from the richtext editor via XSLT or Razor, so that it shows the anchor links (example on the right side of the page) when they are defined in the richtext editor. I need it to be dynamic, because that i dont have anchor points on every page, so that the (right side) is blank when the anchor points aren't defined.
It is pretty hard to explain in english, so i hope that you understand my question.
You can do this using uComponents' xml:Parse XSLT extension if you have uComponents installed. Chriztian has posted a nice include file for parsing WYSIWYG content here. Following his example, here's a simple XSLT to find the anchor tags (a tags with no href or with no content) within the bodyText:
I was going to suggest using my include, but thought it was just a tad on the advanced side of things, but you just pulled the necessary bits. Great!
Note: Lee has since fixed some things to make this easier, so there'll be a couple of new Parse*** methods in uComponents that will take care of the stuff I'm "entitizing" my way out of...
Fetching Anchor Points from Richtext Editor
Is there a way to fetch anchor points from the richtext editor via XSLT or Razor, so that it shows the anchor links (example on the right side of the page) when they are defined in the richtext editor. I need it to be dynamic, because that i dont have anchor points on every page, so that the (right side) is blank when the anchor points aren't defined.
It is pretty hard to explain in english, so i hope that you understand my question.
Hi Rene,
You can do this using uComponents' xml:Parse XSLT extension if you have uComponents installed. Chriztian has posted a nice include file for parsing WYSIWYG content here. Following his example, here's a simple XSLT to find the anchor tags (a tags with no href or with no content) within the bodyText:
Note you need to have the ucomponents.xml extension enabled in your /config/xsltExtensions.config:
Hope this helps,
Tom
@Tom: Kudos for writing that answer!
I was going to suggest using my include, but thought it was just a tad on the advanced side of things, but you just pulled the necessary bits. Great!
Note: Lee has since fixed some things to make this easier, so there'll be a couple of new Parse*** methods in uComponents that will take care of the stuff I'm "entitizing" my way out of...
/Chriztian
is working on a reply...