Show featured article always first in Latest News Ext.
- Posted by Niqui (2) Offline
Hi,
I'm happy to use Latest news Extended on one of my clients' website. I have one question/issue: in the category we use for the news articles we have one articel marked as Featured. The module is set to show featured articles. I have set up the module to show three articles. The featured one, and two others. If a new article will be added, I would like the featured articel to stay first, and the new articel should come in the second place.
I hope you understand what I mean.
Is this possible? Because the alternative would be to tell my client that he always has to modify the date of the featured article to keep it in the first place. And as you probably know... clients only tend to remember the simple things
Would be great if there's a solution!
Thanks,
Niqui
10 years 4 months ago #1
by Niqui
I'm happy to use Latest news Extended on one of my clients' website. I have one question/issue: in the category we use for the news articles we have one articel marked as Featured. The module is set to show featured articles. I have set up the module to show three articles. The featured one, and two others. If a new article will be added, I would like the featured articel to stay first, and the new articel should come in the second place.
I hope you understand what I mean.

Is this possible? Because the alternative would be to tell my client that he always has to modify the date of the featured article to keep it in the first place. And as you probably know... clients only tend to remember the simple things

Would be great if there's a solution!
Thanks,
Niqui
Please Log in or Create an account to join the conversation.
- Posted by TemplatePlazza (5310) Offline
Hi sorry for delay in responding.
Please try to open the file modules/mod_relateditemsxtd/helper.php, around lines 149 find this codechange toPlease let me know whether it's working or not
10 years 4 months ago #2
by TemplatePlazza
Please try to open the file modules/mod_relateditemsxtd/helper.php, around lines 149 find this code
case 0: default: $orderby = "created DESC" ; break;
case 0: default: $orderby = "c.featured DESC, created DESC" ; break;
Please Log in or Create an account to join the conversation.
- Posted by Niqui (2) Offline
Hi,
Thanks for your answer, and sorry for the delay in my response. I didn't get to finish the last details of the website until now.
Unfortunately I can't find the file you mention. I don't have a folder modules/mod_relateditemsxtd/. I DO have a folder called modules/mod_latestnewsxtd/ and modules/mod_related_items/. But in the files in these folders I can't find that piece of code either.
Maybe you can help me out with another hint on where to find it?
Thanks a lot!
Niqui
10 years 4 months ago #3
by Niqui
Thanks for your answer, and sorry for the delay in my response. I didn't get to finish the last details of the website until now.
Unfortunately I can't find the file you mention. I don't have a folder modules/mod_relateditemsxtd/. I DO have a folder called modules/mod_latestnewsxtd/ and modules/mod_related_items/. But in the files in these folders I can't find that piece of code either.
Maybe you can help me out with another hint on where to find it?
Thanks a lot!
Niqui
Please Log in or Create an account to join the conversation.
- Posted by TemplatePlazza (5310) Offline
Sorry I was thinking it was related items extended module. Please try these steps :
- open mod_latestnewsxtd.xml, arround lines 36 you'll see this code :
change that to
then open file mod_latestnewsxtd/helper.php
arroud lines 97 you'll see this code :
change that to
then from your module backend, change the option Order by to Favorite
10 years 3 months ago #4
by TemplatePlazza
- open mod_latestnewsxtd.xml, arround lines 36 you'll see this code :
<field name="ordering" type="list" default="published" label="MOD_LATESTNEWSXTD_ORDERING_LABEL" description="MOD_LATESTNEWSXTD_ORDERING_DESC">
<option value="c_dsc">MOD_LATESTNEWSXTD_RECENT_ADDED</option>
change that to
<field name="ordering" type="list" default="p_dsc" label="MOD_LATESTNEWSXTD_ORDERING_LABEL" description="MOD_LATESTNEWSXTD_ORDERING_DESC">
<option value="f_dsc">Favorite</option>
<option value="c_dsc">MOD_LATESTNEWSXTD_RECENT_ADDED</option>
then open file mod_latestnewsxtd/helper.php
arroud lines 97 you'll see this code :
'c_dsc' => 'a.created',
'p_dsc' => 'a.publish_up',
change that to
'c_dsc' => 'a.created',
'p_dsc' => 'a.publish_up',
'f_dsc' => 'a.featured',
then from your module backend, change the option Order by to Favorite
Please Log in or Create an account to join the conversation.