Hi there,
i am running 1.2.3 "Black Rock".
I am wanting to display news items based on a custom field i have added.
The concept:
I want to have a "featured" news item displayed on the home page. The custom Field is called "Featured" and it is a tick box. So i am only wanting to display news items that have the featured tick box ticked.
I have tried: sortby="featured" and sortby="news_featured"
The Question:
Is this possible?
Thanks in advance
Sort news by custom field
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Sort news by custom field
sorting or filtering by custom fields is not possible at this time.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Sort news by custom field
Create a new template for homepage news. In the template, check for the "featured" custom field. If it is present, carry through with outputting the html for the news item. if it is not present, do nothing. This is not as efficient as sorting on a custom field but it should have the desired output.
A better solution would be to use a "featured" category and then only display that category on the homepage.
A better solution would be to use a "featured" category and then only display that category on the homepage.
Re: Sort news by custom field
Yes that would be the best way to do it, but the issue is i will have to post news items twice as in one news item will be in the database twice which is just a hassle.leslie894 wrote: A better solution would be to use a "featured" category and then only display that category on the homepage.
Is it possible to assign news items to more that one cat?
Re: Sort news by custom field
No but you can display subcategories with "General*" (view help module) and one category with "General | Featured"relic wrote: Yes that would be the best way to do it, but the issue is i will have to post news items twice as in one news item will be in the database twice which is just a hassle.
Is it possible to assign news items to more that one cat?
Alby