Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Themes /

Discuss SilverStripe Themes.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

problem with template outputting hyper link

Go to End

3 Posts   1263 Views


Community Member, 41 Posts

9 April 2010 at 4:03pm

I have a page object that has a field which contains a hyperlink, which is similar to ''

This can be seen file inside the backend, but in the frontend it doesn't show up $hyperlink, I've also try $hyperlink.XML


Forum Moderator, 5523 Posts

11 April 2010 at 12:28pm

Could you publish your code just to make sure people can fully understand the issue.

If you have a HyperLink in the $db array then you should just be able use $HyperLink in the template. If you link to a file object (eg attach it to a page) then you have to use $HyperLink.Link


Community Member, 41 Posts

12 April 2010 at 9:03pm

I've try that be it doesn't work

static $db = array(
'Date' => 'Date',

'ArticleTitle' => 'Text',
'Hyperlink' => 'Text',
'PublicationName' => 'Text',
'Vol_Issue' => 'Text',
'PublicationOrigin' => 'Text',
'Language' => 'Text',
'ArticleType' => 'Text',
'ProjectAward' => 'Text',
'RelatedOffice' => 'Text',
'ProjectCity' => 'Text',
'Person' => 'Text',
'ClientPerson' => 'Text',
'ThirdParty' => 'Text',
'ExternalHyperlink' => 'Varchar(255)',
'Filename' => 'Varchar(255)',

<strong><a class="tooltip" href="$ExternalHyperlink" rel="#note_$ID">$Title.XML</a></strong>

As you can see I have two links, the Hyperlink works fine, but when I use ExternalHyperlink nothing is output. All the other fields work fine too