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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Problem with simpletreedropdownfield


Go to End


12 Posts   2797 Views

Avatar
frabraha

Community Member, 49 Posts

31 October 2009 at 2:28am

Edited: 31/10/2009 2:30am

Having a little problem with the simpletreedropdownfield.

It doesn't show any styling with the sitetree at all, its just a simple list of the menu showing. It doesn't show where the submenu's are. Everything works its just the dropdownfield that doesn't show any styling in the list.
Doesn't the dropdownfield work right in a popup field?

Here's the code for the popup field with the simpletreedropdownfield..

	function getCMSFields_forPopup_intern() { 
		return new FieldSet( new SimpleTreeDropdownField("InternalLinkID", "InternalLinker", "SiteTree"));		
	} 	

Avatar
UncleCheese

Forum Moderator, 4102 Posts

31 October 2009 at 2:39am

What do you mean "styling?" SimpleTreeDropdown is just dropdown list of all the items in the class, indented by hierarchy.

Avatar
frabraha

Community Member, 49 Posts

31 October 2009 at 2:47am

Here's what I mean..

Treedropdownfield

Avatar
UncleCheese

Forum Moderator, 4102 Posts

31 October 2009 at 5:07am

When you view the source, are there   entities in the option tags?

Avatar
frabraha

Community Member, 49 Posts

2 November 2009 at 9:33pm

No, doesn't look like it.

Heres the source:

<select id="DataObjectManager_Popup_AddForm_InternalLinkID" name="InternalLinkID"><option value=""> </option><option value="76">News module successfully installed</option><option value="13">Velkommen!</option><option value="31">RSS</option><option value="33">E-handelsløsning</option><option value="36">Nyhetsbrev</option><option value="42">Standardfunksjoner</option><option value="43">Webstruktur</option><option value="78">Denne burde vises</option><option value="6">Produkter fra Webcronize</option><option value="34">Filarkiv prosjekt</option><option value="35">Tilleggsmoduler</option>

Avatar
UncleCheese

Forum Moderator, 4102 Posts

3 November 2009 at 2:38am

But the same code, outside of the popup, renders correctly?

If you edit a file in the Files & Images section, do you get a proper SimpleTreeDropdown for the folder?

Avatar
frabraha

Community Member, 49 Posts

3 November 2009 at 3:44am

The dropdownfield in Files & images section looks fine.

Here is the source when the dropdownfield isn't in the popup:

<label class="left" for="Form_EditForm_InternalLinkID">InternalLinker</label><div class="middleColumn"><select id="Form_EditForm_InternalLinkID" name="InternalLinkID"><option value="13">Velkommen!</option><option value="6">Produkter</option><option value="42">&nbsp;&nbsp;Standardfunksjoner</option><option value="43">&nbsp;&nbsp;&nbsp;&nbsp;Webstruktur</option><option value="44">&nbsp;&nbsp;&nbsp;&nbsp;Artikler</option><option value="45">&nbsp;&nbsp;&nbsp;&nbsp;Nyheter</option><option value="46">&nbsp;&nbsp;&nbsp;&nbsp;Filarkiv</option><option value="47">&nbsp;&nbsp;&nbsp;&nbsp;Kontaktskjema</option><option value="48">&nbsp;&nbsp;&nbsp;&nbsp;Statistikk</option><option value="49">&nbsp;&nbsp;&nbsp;&nbsp;Brukeradministrasjon</option><option value="35">&nbsp;&nbsp;Tilleggsmoduler</option><option value="36">&nbsp;&nbsp;&nbsp;&nbsp;Nyhetsbrev</option><option value="37">&nbsp;&nbsp;&nbsp;&nbsp;Responsskjema</option><option value="38">&nbsp;&nbsp;&nbsp;&nbsp;Billedgalleri</option>

Avatar
frabraha

Community Member, 49 Posts

5 November 2009 at 9:26pm

Edited: 05/11/2009 9:26pm

Have you figured out why this is happening in the popup field and maybe how to solve this little problem? :)

Go to Top