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?
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.
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.
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.
You may want to check this out:
http://www.tinyportal.net/index.php?topic=3320.msg100310#msg100310
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?
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!
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.
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?
There already is in the block code snippets board.
I reviewed the reference on the link provided above http://www.tinyportal.net/index.php?topic=3320.msg100310#msg100310 and it seems to work but it is only displaying summary information. The body of the articles that contain some graphics are not being displayed only the subject.
Is it a matter of determining the field for the Body and adding it to the SQL statement so it will display properly?
You got it Chamdar. Just add the body field and the call in the output for the body.