17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1541 Views |
-
TreeDropdownField showing Admin instead of Site Content

5 December 2008 at 2:46am Last edited: 5 December 2008 2:50am
I am trying to create a drop down menu that displays the pages on my site... but when I use 'TreeDropdownField' it gives me a list of site admin ... not the pages.
Is there anything I'm doing wrong here?
static $has_one = array(
'BoxTree1' => 'SiteTree'
);function getCMSFields() {
$fields->addFieldToTab('Root.Content.Box1', new TreeDropdownField('BoxTree1','More Link'), "SiteTree");
}
-
Re: TreeDropdownField showing Admin instead of Site Content

5 December 2008 at 3:22am Last edited: 5 December 2008 3:23am
From memory I think it's like this:
$fields->addFieldToTab('Root.Content.Box1', new TreeDropdownField('BoxTree1ID', 'More Link', 'SiteTree'));
-
Re: TreeDropdownField showing Admin instead of Site Content

5 December 2008 at 3:42am
Sweet! it worked. This was driving me mad. Thanks man!
-
Re: TreeDropdownField showing Admin instead of Site Content

5 December 2008 at 4:32am Last edited: 5 December 2008 5:22am
Uh oh... now I have a new problem... how do I return the URL from a selection? It seems to be returning an ID.
| 1541 Views | ||
|
Page:
1
|
Go to Top |


