71 Posts
Filip
10 years ago
14
Topic

A Seblod newbie... who is working on creating a database of policy document. I have gotten quite far by trial-and-error, but I am now also quite stuck... was hoping that someone could help me with information on the following function I would like to include.

I would like to be able to sort my columns alphabetically according to the field (when clicking on the header). Found a post on this and a suggestion to install datatable (www.datatables.net/download/)... but it was not possible to install this (im on Joomla 2.5).

If you could help me with this problem, I would be much obliged!!

Looking forward to your answers

Get a Book for SEBLOD
10 years ago
6
Level 1

Hello,

there is two way for doing that:

Like you say, you could use the datatable JS script, but for that you have to create your own template.

The second way is to, use the new plugin field "Search Ordering" which will be pubished today or tomorrow. It will allow you to add a field in your search form to choose how to order the list dynamically.


Best regards.

Lionel

71 Posts
Filip
10 years ago
0
Level 2

Think I will wait for the new plugin :)

Sounds like the perfect solution...

71 Posts
Filip
10 years ago
4
Level 2

Hi again,

Just downloaded and installed the search ordering plugin... but having some difficulties to make it work...

Essentially everything appears on the frontend, it just doesnt sort the list when an option is selected. In fact, the normal ordering also seem not to be working.

Followed the same setup as on your pictures. Attaching some from my side to demonstrate how i put it up.

Your help would be greatly appreciated!


image 1

image 2

image 3

image 4

10 years ago
3
Level 3

Hello Filip,

first, please, update SEBLOD (3.1.2) and Joomla (2.5.11).

In your first screenshot, are you sure for the field "testing2" ?

is it the good field for the title ?

Here an other example on how to use this plugin with options ASC or DESC:

For example, if you want to search on the title (ASC or DESC), add the title field with option ASC, and add a Alias of this field with option DESC.

An alias is a field with the same storage. Make this alias on the content type view (form or content). 


Best regards.

Lionel

71 Posts
Filip
10 years ago
2
Level 4

Did the updates (for joomla and seblod), changed the fields (and also their storage from custom to standard) and added an alias for each field (with the same storage).

Now the list is at least responsive to the ordering field in terms of actually changing the order of the content. The problem is however that it doesnt always put everything in the correct order. Works OK for the titles, but it doesnt for example sort the years in the correct order.

Any idea why this may be the case?

60 Posts
fredee
10 years ago
1
Level 5

Hi

related however not completely similar.

we are having problems with sorting in the seblod list sort function.

have problem when have multiple sort apha/num columns

it appears to occur when have mixture of one and two words in the field of the column.

we have not investigated yet, however this may provide a tip.

cheers

10 years ago
0
Level 6
Hi all,

@Filip:

changed the fields (and also their storage from custom to standard)
After doing that have you edit and save all you content to take into account changes?

Sorting a column depends on the type of data. If the data is stored in varchar, it will sort of string, so all depends on how you are storing years in database.

In plugin Field, you could define which type you want by clicking on the checkbox after the storage:


Best regards.
Lionel

41 Posts
Umair Hassan
10 years ago
1
Level 1

Hi,


Sorry I am interfering in this Thread.


As I can not buy Seblod Products in Pakistan, I have used TableSorter JS script for Search List. 

Can anybody tell if it is better to use TableSorter JS script or I should use Search Ordering plugin?


See the results I got by using that Script:



Thanks & Regards,

Umair Hassan Raja


116 Posts
nycxav
9 years ago
0
Level 2

Hi, 

Could you please explain how you created your list template? 

I'm struggling to put the tight code to call the javascript.

Thanks.

106 Posts
krkr
10 years ago
1
Level 1

Hi

What *_alias fields should be? Just dumb text boxes? or exact type?

Brgds

10 years ago
0
Level 2

Hello krkr,


an "alias" field, is a field with the same storage as the original, but can be an other type.

By default, when we add alias for the search ordering, wwe use Text field because is the most simple.


Regards.

Lionel

106 Posts
krkr
10 years ago
0
Level 1

Hi

Thanks Lionel. will try and let you know results. Shouldn't this topic be solved?

Brgds

106 Posts
krkr
10 years ago
0
Level 1

Hi

Seems that I can't get ordering to work, or if it works then I have problems with double values in DB.

So, I have field "price" (text field Standard -> Article), in search I added Ordering field and added "price" field to it. 

Now I add alias field "price_alias", so I added this to Admin form with same storage Standard -> Article.

Seems that sorting is working, BUT when I open in Admin form article , edit it by inserting new price it ends up with wrong price in DB.

Case is here

I can't get what is wrong there.

Thank you


106 Posts
krkr
10 years ago
0
Level 1

SOLVED !!!

Added alias fields ONLY in Intro inside position "hidden" pointed to Standart -> Free -> table -> column.

Brgds

Get a VIP membership