Serial number for listing of Content Lists (Category layout)

More
2 years 7 months ago #80693 by nikitagupta2106
Hi,

I'm using the Table listing in Category Layout. The lists are showing in table format which is great.

However, I want to place serial numbers on the listings like in the following format:

1. NameA      EmailA      PhoneA     Gender     Location
2. NameB      EmailB      PhoneB     Gender     Location
3. NameC     EmailC      PhoneC     Gender     Location

Now, I could use {{item->id}} as a suffix to a new field but that would go in descending order as 1 would be given to the first entry. In my case, I want 1 to be the latest (newest) entry.

How can I achieve this?
 

Please Log in or Create an account to join the conversation.

More
2 years 7 months ago #80694 by ggppdk
Hello

you can only order listing by a specific field

either order by some text / number field that stores your numbering
or by creation date


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
2 years 7 months ago #80699 by nikitagupta2106
I don't want to order listings. I just want "serial number" at the table listing. so it reads in the following format:

1. NameA     EmailA     PhoneA      Gender      Location
2. NameB     EmailB     PhoneB      Gender      Location
3. NameC     EmailC     PhoneC      Gender      Location
4. NameD     EmailD     PhoneD      Gender      Location
5. NameE     EmailE     PhoneE      Gender      Location
etc etc

Is there a simple method to achieve this? It doesn't have to be entered into the database.

Please Log in or Create an account to join the conversation.

More
2 years 7 months ago #80700 by ggppdk
Hello

Edit the category layout that you are using

then customize the code of files (do the same changes in both files, they are 99% same files)
category_items.php
category_items_html5.php

The above files contains the loop the iterates through the list of items

 


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
2 years 7 months ago #80716 by nikitagupta2106
Thank you so much.

I got it working with this code in the template category_items.php:
Code:
<td><?php echo ($i+1); ?></td>

Hope my code is useful to others who might be looking for such a solution.

Please Log in or Create an account to join the conversation.

More
2 years 7 months ago #80721 by micker
thanks for return

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.292 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline