dokuwiki-plugin-struct
dokuwiki-plugin-struct copied to clipboard
Add URL type configuration to choose another field as link text
URL fields do not look very nice in an aggregation, especially if the URLs are long. It would be nice to be able to choose an alternate field as link text in the URL field configuration.
For example, in a schema with the fields title and url, one could chose title as link text field in the URL configuration. The value entered in the title field would be used as the link text when rendering the URL in an aggeregation.
title=My Page url="http://a-very-long-url.com/which/is/really/very/long"
The rendered link would look like this:
<a href="http://a-very-long-url.com/which/is/really/very/long">My Page</a>
instead of
<a href="http://a-very-long-url.com/which/is/really/very/long">http://a-very-long-url.com/which/is/really/very/long</a>
The URL type now has the options to autoshorten the displayed URL and to use a fixed text. Using another field as the label is still an interesting option though.