There is already a URL field. It's just hidden in the SOURCE selector. For my own website, I broke it out by adding a few simple lines into the DCA. You'll have to add some template magic to display the URL, which is not normally displayed by the default template when you have a DEFAULT story.
system/config/dcaconfig.php
Code:
// URL => break out, so it can be used in story modes too
$GLOBALS['TL_DCA']['tl_news']['palettes']['default'] = str_replace(',source', ',source,url,target', $GLOBALS['TL_DCA']['tl_news']['palettes']['default']);
unset($GLOBALS['TL_DCA']['tl_news']['subpalettes']['source_external']);
// Url
$GLOBALS['TL_DCA']['tl_news']['fields']['url']['eval']['mandatory'] = false;
It will work like before, but EXTERNAL will no longer be a sub-palette, since I've broken out the fields to be permanent.
Then all you have to do it to add the URL export to your template. The segment below was intended for the READER template, since the url is already overridden if its an external item in a list view.
You can see it in action here:
http://www.thyon.com/portfolio-detail/i ... ndlin.html
Bookmarks