TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 219
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 92
  • Total: 92

Organizing Articles by Category and sorting within Category

Started by Chamdar, November 02, 2007, 03:55:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Chamdar

I am hoping somebody can help me with this.  I would like to organize my articles by category and sort within said category.

Here is an Example:

Category 1
  Article 1
  Article 2
Category 2
  Article 1
  Article 2

How can I set this up so the articles can be sorted within a category and the categories themselves are sorted?

IchBin

Where do you want to list this? Do you want it in a menu type listing? Need as much details as you can give us before we can give you straight answer.

If you're talking about in the admin panel, you'll have to wait until TP 1.0 comes out.

Chamdar

Quote from: IchBinâ,,¢ on November 02, 2007, 04:08:31 PM
Where do you want to list this? Do you want it in a menu type listing? Need as much details as you can give us before we can give you straight answer.
I would like to display the articles on the front-page (I believe this is the default.

Chamdar

Just <bumping> to check on options.  I'm thinking I might need to create a separate block for each of the catagories so they will all be grouped together.  However, I tried an example block and I'm not able to get it to display in the same area where the current articles are displaying.


Chamdar

Quote from: lebisol on November 05, 2007, 05:31:28 PM
You may want to check this out:
http://www.tinyportal.net/index.php?topic=3320.msg100310#msg100310
Lebisol, thanks for the link, I would just like to clarify, once I create a new block (PHP Block I assume?)for the 3 categories I have, do I need to add PHP code to each of them with the appropriate query to pull only the relevant catergory?

lebisol

PHPbox right, I belive this script pulls all categories. Sort of a "cat directory" idea.
To use your idea your would have to adjust the sql and then show phpbox in sections u like.
I have not tried to customize this yet but it is on a def. "to do". :)
Maybe IchBin can help if you need tweaks to it.
All the best!

IchBin

Well, to get it to display on the frontpage you'll have to add a bunch of changes to the TP source files. I'm not willing to modify that stuff at this point. Much rather, I would just make a code snippet to list all the articles separating them by categories. But that would be all in one article. You could get them to display to your own customization.

Chamdar

Quote from: IchBinâ,,¢ on November 07, 2007, 05:17:22 PM
Well, to get it to display on the frontpage you'll have to add a bunch of changes to the TP source files. I'm not willing to modify that stuff at this point. Much rather, I would just make a code snippet to list all the articles separating them by categories. But that would be all in one article. You could get them to display to your own customization.
Can you provide an example of a code snippet that would list all the articles separated by category?

IchBin


This website is proudly hosted on Crocweb Cloud Website Hosting.