dokuwiki-plugin-struct icon indicating copy to clipboard operation
dokuwiki-plugin-struct copied to clipboard

Add URL type configuration to choose another field as link text

Open r0the opened this issue 8 years ago • 1 comments

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>

r0the avatar Mar 02 '17 22:03 r0the

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.

splitbrain avatar Jun 28 '21 07:06 splitbrain