Controlling the display of My Articles and Scheduled Content?

  • Martin Beaumont
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 6 months ago - 2 years 6 months ago #146611 by Martin Beaumont
Hi there,
Is there a way to display Scheduled Content in a chosen order (Alpha, last published, first published, ID etc)? or a module available to display your Scheduled Content in a specific manner?  I have category of about ~60 articles that I'd like to have sorted/displayed in Title Alphabetic ordering? 

As a partial workaround I've used the menu type 'My Articles' to show the membership limited content, and now I'd like to remove the Hits column? Is there an override I can do to this view to remove the table column? Or even better if there were some layout options within the menu controls, such as selecting which columns to display, table ordering etc?

A few minutes later .... this looks to be the file I need to override > public_html/components/com_osmembership/view/articles/tmpl/default.php

Any ideas how I might do that?
Thanks,
Last edit: 2 years 6 months ago by Martin Beaumont. Reason: Further info

Please Log in or Create an account to join the conversation.

More
2 years 6 months ago #146620 by Tuan Pham Ngoc
For Scheduled Content, it is always ordered by the date which it will be available first , then title

So the nearest available content will be displayed first

If you want to order it by title, you will need to edit the code.The file is components/com_osmembership/model/schedulecontent.php, there is code:
Code:
->order('b.number_days') ->order('a.title');

Remove ->order('b.number_days') from that code and it will just ordered by title

Regards,

Tuan
The following user(s) said Thank You: Martin Beaumont

Please Log in or Create an account to join the conversation.

  • Martin Beaumont
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 6 months ago #146702 by Martin Beaumont
Thanks Tuan,

And if I wanted to override public_html/components/com_osmembership/view/articles/tmpl/default.php - is that possible?

Please Log in or Create an account to join the conversation.

More
2 years 6 months ago #146703 by Tuan Pham Ngoc
Sure. Just move the modified file to PATH_TO_TEMPLATE/html/com_osmembership/articles folder when the change is done

PATH_TO_TEMPLATE is path to the template you are using on your site

Regards,

Tuan
The following user(s) said Thank You: Martin Beaumont

Please Log in or Create an account to join the conversation.

  • Martin Beaumont
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 6 months ago #146704 by Martin Beaumont
Excellent - thanks!!

Please Log in or Create an account to join the conversation.

More
2 years 6 months ago #146712 by Tuan Pham Ngoc
You're welcome

Tuan

Please Log in or Create an account to join the conversation.