Гость
02 Янв 2013 15:45

I have one Section. Is it possible to add one of my fields to the 'Primary Order' pop-up list? I think I've seen other people achieve this, but haven't figured it out. Apologies if its blindingly obvious!

Thanks.

Последние изменения: 02 Март 2014


pepperstreet VIP
Total posts: 3,837
02 Янв 2013 19:49

Primary order parameter in backend? AFAIK, not possible.

Regarding frontend sorting order: Yes and No. Certain fields can be set to "sortable" in field parameters. i.e . Boolean, Radio, Select etc. "Sortable fields appear in your sorting menu.


Sergey
Total posts: 13,748
02 Янв 2013 22:30

You can do this but you will have to create link manilly.

  1. On you page inspect your sorting element

  1. After you get field name you can copy your current URL and add t it.

index.php?option=com_cobalt&view=records&section_id=1&Itemid=444&filter_order=field^k7b707926e5695cbaf6a90706436a2614^digits&filter_order_Dir=asc

That should actually sort it initially.


Гость
04 Янв 2013 05:37

Hello

Thanks for the replies. Tried the manual link, but no success so far. The 'Primary order' set in the Section form (on my site 'r.title ASC') over rides the value I set in the link.

Dug much deeper into the back end and can see that adding to 'Primary order' in Section, even if possible, is way beyond me at the moment (esp. as very limited in amount of time I can spend on this at moment).

So I'm falling back on a 'bodge' I thought up at the start. I will replace current data in 'title' (house property names) with the value I want to sort on (number of bedrooms in each house). Not elegant but it will move the site on.


Гость
04 Янв 2013 05:59

Ah ha! Got the link working! I'd introduced an error in the structure. Luckily went back over it before messing with the field order.

Thanks very much.


Sergey
Total posts: 13,748
04 Янв 2013 08:30

Very good!


Sergey
Total posts: 13,748
07 Янв 2013 00:49

Any chance to add such a feature in the backend?

You men to order by field?


Гость
18 Янв 2013 11:41

Sorry to come back to this. The custom URL version was working fine. Then I wanted to add in the clean records feature:

&task=records.cleanall

And initially that worked and I published the site.

However, I've realised this only works 'once' during the session the URL is edited. The link cleans and applies the filter order. But if the browser is closed and reopened, the behaviour reverts to sorting by title and the URL has no effect, until I log in, remove it, replace it and test it again.

Thanks for any ideas or advice.


Sergey
Total posts: 13,748
20 Янв 2013 00:05

I did not understand what is going wrong? Can you explain in more details.


Гость
21 Янв 2013 04:27

Hello

Basically, I want to combine the advice from this thread with the advice above - to create a link that cleans all records and sorts them using 'filter_order=field .. '.

The link I created works while the browser is open. If I close and reopen the browser, the link fails and the menu link reverts to its standard behaviour - listing records by title and applying filtering if the Jumpmenu has been used.

Cheers


Sergey
Total posts: 13,748
21 Янв 2013 07:18

Right that URL with parameters have to be permanent enter point. If later you open not through that URL nothing will be applied.


pepperstreet VIP
Total posts: 3,837
21 Янв 2013 16:39

Just a little headsup and sub-request:

Please, could you add the INITIAL-CREATE date to the sorting order selectbox ?! Also show/hide parameter in default templates.

Hard to find a suitable term for it, because you already use "create date" everywhere ;-)


Sergey
Total posts: 13,748
21 Янв 2013 21:18

Also show/hide parameter in default templates.

Those are have to be there. Or show/hide what do you mean?


Гость
23 Янв 2013 06:09

Ah - OK. I will go back to Plan A - and populate the 'Title' field with the data I want to sort on, and edit the template to display in the order I want. Then use the example from my previous thread.

Cheers

Работает на Cobalt