Keyword

[SOLVED] Category list with ordered list

  • Abdulrahman Ghadafi
  • Abdulrahman Ghadafi's Avatar Topic Author
  • Offline
  • New Member
More
11 years 4 months ago #113570 by Abdulrahman Ghadafi
[SOLVED] Category list with ordered list was created by Abdulrahman Ghadafi
Hi All,

I wonder if it is possible to list all items i have in a certain category as an ordered list .... I appreciate any suggestions.

Rgds,

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

More
11 years 4 months ago #113571 by Peter Grube
Replied by Peter Grube on topic Re: Category list with ordered list
HI Abdul, have tried the K2 Content Module ?

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

  • Abdulrahman Ghadafi
  • Abdulrahman Ghadafi's Avatar Topic Author
  • Offline
  • New Member
More
11 years 4 months ago #113572 by Abdulrahman Ghadafi
Replied by Abdulrahman Ghadafi on topic Re: Category list with ordered list
Hi Peter,

K2 content module doesn't give me what I want, I want to display all items in a category as an ordered list with numbers and pagination, I tried to work around the php files, but still didnt get a great result.

Any suggestions ??

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

  • Abdulrahman Ghadafi
  • Abdulrahman Ghadafi's Avatar Topic Author
  • Offline
  • New Member
More
11 years 4 months ago #113573 by Abdulrahman Ghadafi
Replied by Abdulrahman Ghadafi on topic Re: Category list with ordered list
Hi

I modified this part in the category.php file
Log in  or Create an account to join the conversation.

  • Mohamed Abdelaziz
  • Mohamed Abdelaziz's Avatar
  • Offline
  • Platinum Member
  • Joomla Developer
More
11 years 4 months ago - 11 years 4 months ago #113574 by Mohamed Abdelaziz
Replied by Mohamed Abdelaziz on topic Re: Category list with ordered list
you can use the start attribute of the OL element, like this:
<ol start="<?php echo $pageStart; ?>">

where pageStart = (pageNumber - 1 ) * pageTotal + 1

Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store

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

  • Abdulrahman Ghadafi
  • Abdulrahman Ghadafi's Avatar Topic Author
  • Offline
  • New Member
More
11 years 4 months ago #113575 by Abdulrahman Ghadafi
Replied by Abdulrahman Ghadafi on topic Re: Category list with ordered list
Thank you for the reply Mohamed, I hope this doesn't sound stupid :blink: ... where should I insert:

"pageStart = (pageNumber - 1 ) * pageTotal + 1" ??

Thank you once again for ur help :)

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

  • Mohamed Abdelaziz
  • Mohamed Abdelaziz's Avatar
  • Offline
  • Platinum Member
  • Joomla Developer
More
11 years 4 months ago #113576 by Mohamed Abdelaziz
Replied by Mohamed Abdelaziz on topic Re: Category list with ordered list
No problem :)

Try this code:
<ol start="<?php echo $this->pagination->limitstart + 1; ?>">

Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store

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

  • Abdulrahman Ghadafi
  • Abdulrahman Ghadafi's Avatar Topic Author
  • Offline
  • New Member
More
11 years 4 months ago #113577 by Abdulrahman Ghadafi
Replied by Abdulrahman Ghadafi on topic Re: Category list with ordered list
Thank you very much :woohoo: ..... everything is working perfectly now, thank to you Mohamed ;)

For any one who wants the same thing here is the code:
Log in  or Create an account to join the conversation.