36 Posts
julien
10 years ago
2
Topic

Hello all,

I use the plugin search total.

it works well but i can only show total results in the search view.

I would show the total results in the list view. Is it possible?

Thanks to help me.

Get a Book for SEBLOD
4229 Posts
Kadministrator
10 years ago
1
Level 1

There is no position in the list that only shows once,  all positions on lists get repeated so you would get this displayed with each result.

36 Posts
julien
10 years ago
0
Level 2

Hi Klas,

I've seen that all position get repeated for each result in list view but i can use the jgrid plugin to know the number of the item and use a "if" conditiion in a beforerender field.

The aim is to use some template like this.

for exemple:

If i use the jgrid typo with increment option on the article id field i can write this code in a codebeforerender field:

if ($fields['art_id']->typo==1) { $fields['myfield']->value="first_part_of_html_or_js"; }

if ($fields['art_id']->typo>=1) { $fields['myfield']->value="repeated_code_with_field_i_need_in_hidden_position"; }

if ($fields['art_id']->typo==TOTAL_RESULTS) { $fields['myfield']->value="last_part_of_html_or_js"; }

I have to say i use the seb_list template modified (without ul and li markup)

So now you know why i really need the number of result in the list view...

i use the beforerender field but it's possible to do overwrite (item view)

regards

Get a VIP membership