Closed nilshoerrmann closed 12 years ago
It should show whatever SBL returns. In previous Symphony versions this was the ordering of the associated section (e.g. if Order Entries was being used) but it seems this was reverted (not sure if deliberately or not). Publish Filtering shouldn't artificially change this order itself.
http://symphony-cms.com/discuss/thread/473/10/#position-188 https://github.com/symphonycms/selectbox_link_field/issues/20
Does that mean Publish Filtering obtains the filtering given by the entry's section? This sounds quite weird.
Not quite: Publish Filtering will simply render whatever a field returns. Remember PF is relatively dumb. For a SBL field it just shows the same <option>
elements as you see in the SBL on an entry edit form.
The functionality of the SBL field has always been that its options would be ordered in the same manner as the section itself. So if I add an Order Entries field to Section A and sort by that column, then if I include Section A as a SBL field in Section B, the <option>
elements there will be filtered by my order entries. If I change the sorting of the section, the SBLs will reflect this. I don't know why, but this was quietly dropped in Symphony 2.3, which is what the above tickets are asking about.
So in short, if you want to order the options in PF, they should be ordered in the field itself.
Remember PF is relatively dumb.
I'd like Publish Filtering to be clever! You know there is school and university – a whole world of wisdom. Why should we exclude Publish Filtering here, this poor little extension?
I'm really feeling sad now.
I spent his college fund on beer. We'll have to home-school him from now on.
I can see this from both sides, however I am more inclined to agree with @nilshoerrmann on this one. It's a filtering list, not a display of entries, which I would expect to be sorted specifically. It just looks weird otherwise.
Please refer to the SBL discussion. In 2.3 the SBL removed the functionality that ordered its options the same as the parent section. In the discussion I suggested adding another option to the SBL setup to choose the sort order (caveat that it doesn't solve the problem when an SBL pulls from multiple sections). PF will never directly manipulate the options it shows, so it's the role of the field to present these properly.
When trying to filter on a SBL, Publish Filtering will show a select box of available filter values – this list should be sorted alphabetically.