Keyword

Article ordering

  • Duncan Pattinson
  • Duncan Pattinson's Avatar Topic Author
  • Offline
  • New Member
More
4 years 6 months ago - 4 years 6 months ago #175522 by Duncan Pattinson
Article ordering was created by Duncan Pattinson
We add a new k2 article per week to our news section.

The article template is set using K2 settings and clicking categories

Then you can have the 5 most recent Author listings shown.

It DOES not give the option to have featured articles listed.

Any ideas on what to do in this case?

We could add new articles with the same title and then link to the featured articles but this isn't the way we would like to do it.

I have put a support ticket into joomla works and I think having an option to either show recent author listings or show featured or nothing shown would be a relatively easy thing to implement.

I don't wont to change the HTML as when we get an update on K2 this would cause an issue.
Does anyone recommend anything to solve this????
cheers
Last edit: 4 years 6 months ago by Duncan Pattinson. Reason: A simpler question

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

More
4 years 6 months ago #175536 by JoomlaWorks
Replied by JoomlaWorks on topic Article ordering
As the options imply in the category settings, there are the latest items from the current author - the ordering can't be changed.

If you wish to show something else, e.g. the featured items from the entire site, you should use the K2 Content module.

An exact URL would help.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Duncan Pattinson
  • Duncan Pattinson's Avatar Topic Author
  • Offline
  • New Member
More
4 years 6 months ago - 4 years 6 months ago #175551 by Duncan Pattinson
Replied by Duncan Pattinson on topic Article ordering
But if you added a feature option to the author as well as latest then this would solve a lot of issues that many people on the forum have mentioned.

the url example is

www.homebuyerconveyancing.com/conveyancing-news/item/361-coronavirus-covid-conveyancing-update.html

see

Latest from Homebuy1

How would i use the K2 content module?

Hi Fotis

I noticed that you have released a new version of K2 today and the k2 content is included.

1) if i use the k2 content how do I get the chosen items to appear on the website url above. I only see the option to get the chosen items on the main Menu and not the sub Urls.

2) How do i get the K2 content into a position 7 which is the same as the Author latest list.

Are we really sure that a quick fix is what i have asked for in the category settings.

cheers Duncan

I
Last edit: 4 years 6 months ago by Duncan Pattinson. Reason: new option released today which may help with my question

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

More
4 years 6 months ago #175553 by JoomlaWorks
Replied by JoomlaWorks on topic Article ordering
You are the first to ask any sort of filtering for what has a distinct functionality.

The fact that this is stream of items doesn't mean it can be ANY stream of content.

The "K2 Content" module is already very powerful and it's exactly for this sort of content retrieval and filtering. There are tons more on getk2.org/extend (free or commercial) by third party developers.

Here's my advice for you:
- You can create one or more module instances of "K2 Content" to distinct module positions and then call each such positions wherever you want using the free Modules Anywhere plugin (from www.regularlabs.com/extensions/modulesanywhere).
- Follow this guide getk2.org/documentation/tutorials/templating-with-k2-and-the-concepts-of-sub-templates to copy the default K2 template overrides set inside your template's structure (if it doesn't support K2 overrides already).
- Then edit the file item.php which is used for viewing the item and simply place the Modules Anywhere plugin tag which in turn calls the K2 Content module instance you've created on the first step.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Duncan Pattinson
  • Duncan Pattinson's Avatar Topic Author
  • Offline
  • New Member
More
4 years 6 months ago - 4 years 6 months ago #175561 by Duncan Pattinson
Replied by Duncan Pattinson on topic Article ordering
I used the K2 content module and i can see that it will work. Its just a matter of

1) To hide latest articles by Author. I know how to do that.

2) To find the position of latest author items and to then go to K2 content and set that position to the same What is that please?
I can see the option to position the k2 content module.

3) To get K2 content into the article default templates.

I have read your links and i fail to see why this option is not somewhere within the K2 content module since the K2 content module is to cover all pages.

Hoping Fotis that you have an easy solution without the need to change code
Last edit: 4 years 6 months ago by Duncan Pattinson.

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

More
4 years 6 months ago #175564 by JoomlaWorks
Replied by JoomlaWorks on topic Article ordering
1. Great.

2. There isn't any because this is inside the component body. That is why I mentioned you need to place the plugin tags of Modules Anywhere inside the actual output of the component body (in item.php). For example in this line: github.com/getk2/k2/blob/master/components/com_k2/templates/default/item.php#L421

You'll publish the module in an unused or new module position (you can add new module positions where you select them on the right side of the module settings) and then you'll add this snippet on line 421 of the file I mentioned:

{module Name of My Module}

3. See 2.

It's not a matter of editing code, it's a matter of inserting a plugin snippet to surgically position something. The same would apply on WordPress for example.

If your templates supports module positions below the component body, then locate that position name and publish your K2 Content module there (remember to also assign the module it on all pages in its parameters).

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Duncan Pattinson
  • Duncan Pattinson's Avatar Topic Author
  • Offline
  • New Member
More
4 years 6 months ago - 4 years 6 months ago #175567 by Duncan Pattinson
Replied by Duncan Pattinson on topic Article ordering
Hi Fotis

Many thanks for your reply. I will have a go but

In the meantime

Can you please ask your development team if it is easy to add the feature option within
Author options within the category template setting to be as follows

Latest items by Author By ID Number ... Featured .... Hide.

This would resolve the issue and I think will be a great fix.

If i did what you said and their was an update then surely this would overwrite the change in the default template

many thanks

Duncan
Last edit: 4 years 6 months ago by Duncan Pattinson.

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

More
4 years 6 months ago #175584 by JoomlaWorks
Replied by JoomlaWorks on topic Article ordering
You're talking to the developer of K2 :)

Noted to consider for future releases.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Duncan Pattinson
  • Duncan Pattinson's Avatar Topic Author
  • Offline
  • New Member
More
4 years 6 months ago #175607 by Duncan Pattinson
Replied by Duncan Pattinson on topic Article ordering
Thats brilliant. So do you think you will be doing the tweak? When would the next release be?

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

More
4 years 6 months ago #175625 by JoomlaWorks
Replied by JoomlaWorks on topic Article ordering
I said "noted". In the meantime you should use one of the proposed solutions.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum