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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Giving a basic field linking options in the admin?

Go to End

2 Posts   1641 Views


Community Member, 137 Posts

15 September 2010 at 4:39pm

Hi guys,

I have a basic text field that I am using as a place to hold a url for a link button back out on the front end of the site.

Currently I have to copy and paste the url into the field, what I would like to be able to do is have happen to my basic field what happens when you click the link icon in the Tinymce content field.

I'd like to be able to get those linking options to popup and be able to apply to my basic field, so that I could select files from the Silverstripe site, or go to another website etc and have those options.

Is there anyway to do this?

A screen shot of what I am talking about, I'd have a simple field like what is shown ehre Page Name or Label but call it link1, link2 etc and then get that right hand column link options to be able to apply to it.

Any help would be great


Community Member, 344 Posts

15 September 2010 at 11:29pm

Edited: 15/09/2010 11:53pm

You can probably use the TreeDropdownField and replace it with your TextField.

static $has_one = array('RightContent' => 'SiteTree');
$treedropdownfield = new TreeDropdownField("RightContentID", "Choose a page to show on the right:", "SiteTree");