Knowledge Base

Creating links from URLs stored in a custom field

People often need to create links or otherwise use information by storing a URL in a custom weblog entry field.  Typically, the data might be used in a way similar to:

<a href="{custom_url}">{title}</a>

There are a couple of things you’ll want to make sure you’ve done in order to make this work:

1. You’ll want to set the formatting choice for your custom field to “none”.  If you leave the field formatting set to the default “xhtml”, then you’ll have problems with paragraph tags (<p></p>) being added.

2. Under Admin > Weblog Management you’ll want to have the “Automatically turn URLs and email addresses into links?” option set to “NO”.


Note: If you make changes to the field formatting setting after you already have existing entries then you will want to make sure you select the checkbox to have the changes apply to existing entries when you make the formatting alteration.

Remember, you may need to edit the Custom Weblog Field to make the formatting buttons visible when editing your entries.

Last Updated on Feb 27, 2007 at 09:09   ( Permalink )
Category: Templates, Entries, URLs