21496 Posts in 5784 Topics by 2622 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1141 Views |
-
Giving a basic field linking options in the admin?

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.
http://gyazo.com/ec95a72d1ee7f775d3da6f2b6a61bc84.png
Any help would be great
-
Re: Giving a basic field linking options in the admin?

15 September 2010 at 11:29pm Last edited: 15 September 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");
http://doc.silverstripe.org/treedropdownfield
http://api.silverstripe.org/trunk/forms/fields-relational/TreeDropdownField.html
| 1141 Views | ||
|
Page:
1
|
Go to Top |


