Articles to be ordered by

Articles to be ordered by Created Date - Asc and Des for Mini Frontpage Pro. Thanks
Resolved
The discussion has been resolved.
Locked
The discussion has been locked.

Accepted Answer

  • Replied by admin on Wednesday, February 24 2021, 10:25 AM
    It can't be achieved via template override, you need to change the helper file.
    Please open this file with your php editor :
    modules/mod_minifrontpagepro/Helper/MinifrontpageproHelper.php
    at lines 121 you will see this code :

    $ordering = ArrayHelper::getValue($order_map, $params->get('ordering'), 'a.publish_up');
    $dir      = 'DESC';


    change that to :
    $ordering = ArrayHelper::getValue($order_map, $params->get('ordering'), 'a.publish_up');
    		if($ordering == 'c_dsc'){
    			$dir      = 'ASC';
    		}else {
    			$dir      = 'DESC';
    		}

    • anirudh7 - 6 days ago
      Actually it broke another minifrontpage modules(i have multiple modules).

      I dont mind waiting for the next update

      2. I cant load more than 12 articles, do I need to change server side settings?
    • admin - 6 days ago
      If you change only the DESC to ASC then it will applied to all modules those have different order settings. But if you use if($ordering == 'c_dsc'){ , it will be applied to module which ordered by 'created' only.
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
     
  • Replied by admin on Wednesday, February 17 2021, 07:22 AM · Hide· #1
    Hi are you suggesting a feature or something else ?
    • anirudh7 - one week ago
      I want to sort the articles by created date(ascending order)
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
  •  
  • Replied by admin on Thursday, February 18 2021, 03:57 AM · Hide· #2
    Ah ok, it will be available in the upcoming 1.4.0 version. We will release it very soon. Please stay tune
    https://www.dropbox.com/s%2Fcwl49m2abst7m9k%2FMonosnap%25202021-02-18%252010-52-44.png?raw=1
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
  •  
  • Replied by anirudh7 on Wednesday, February 24 2021, 10:00 AM · Hide· #3
    Can you please update me the code to achieve it via override, current state defeats my purpose.
  •  
  • Replied by anirudh7 on Wednesday, February 24 2021, 11:38 AM · Hide· #4
    Just changing Desc to ASC worked like charm for now, thanks
    • admin - 6 days ago
      Ok, glad could help ;)
  •  
  •  
    Replied by anirudh7 on Thursday, February 25 2021, 09:57 AM · Hide· #5
    ignore
Discussions are now locked. You will not be able to reply to this discussion