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, biapar, Willr, Ingo, swaiba, simon_w

treedropdownfield: how to filter subsites?


Reply


3 Posts   891 Views

Avatar
dacar

Community Member, 168 Posts

20 May 2011 at 1:07am

Hi, i am trying to get a filtered treedropdown from sitetree. I'd like to show only entries from the Subsite a user is currentely working on in the CMS. Can anybody help?

new TreeDropdownField("Link_internalID", "Interner Link", "SiteTree")

Greetings, Carsten.

Avatar
dacar

Community Member, 168 Posts

30 May 2011 at 8:34am

hu hu,

isn't there anybody who can help?

Carsten...

Avatar
copernican

Community Member, 189 Posts

1 June 2011 at 12:08am

dacar,

I little more information would help me. Are you using the subsites module?

I did a quick test, installed subsites module, and setup a TreeDropdownField on my Page.php. I then used the drop down in the top right corner of the CMS to select my subsite. The TreedropdownField automatically filtered to only show the subsite pages.