0

I'm currently designing a website in Joomla working with the k2 extension for Joomla. Let's simplify things and say I made a Category "A" of k2 articles.

1) I link a main menu to display the articles in "A" by defining the menuitem type as "JA K2 Filter" --> "Items List", and by choosing the associated category "A". If the user of the website clicks on one of the articles, the content is displayed on a new page (without opening a new page), and "/component/k2" is inserted into the URL.

2) I link a main menu to display the articles in "A" by defining the menuitem type as "K2" --> "Categories", and by choosing the associated category "A". If the user of the website clicks on one of the articles, the content is displayed on the same page, but the URL extension is very user friendly, no "/component/k2" insertion, nothing.

I tried the two options above, but what I want to reach is that articles are displayed on a new page (without opening a new site) as in Option 1), but with a user-friendly URL, without any weird insertions, as it happens with option 2). Any help ????

Then, how can I customize the Layout of the display of k2 articles ? for example that the articles defined as the "primary" articles in the settings appear centered (e.g. in the middle column of 3, if only one article is in that row, etc.) ?

0

I don't understand what you mean by opening "in a new site", could you be meaning a new tab?

As for how to customize the layouts of the k2 article pages, Joomla has a functionality called "Template Overrides". What it means is that templates can override the layouts of components and modules, enabling you to apply custom styles to your content.

This is an extensive topic so I will link you to some articles you can read with detailed explanation and pictures for reference:

The Easiest Way to Create Template Overrides in Joomla 3 -> https://www.joomlashack.com/blog/joomla/easy-overrides/

How to Create Template Overrides for Specific Joomla Articles -> https://www.joomlashack.com/blog/joomla/template-overrides-articles/

Joomla 4 tutorials: How to create override for modules, components and layout -> https://www.joomlart.com/tutorials/joomla-4-tutorials-how-to-create-override-for-modules-components-and-layout ->

  • Please do not ask for clarifications in your answer. If the question is Unclear, you can comment under the question and/or flag the question as Unclear. If the question is Too Broad to answer concisely or asks too many questions, please flag the question as Too Broad. Stack Exchange does not strive to be a web traffic controller -- it strives to be the final destination for researchers. Links are good, but they can "die" over time. Please endeavour to post your support statically / in an immortal fashion. – mickmackusa Jul 21 at 0:25
0

I think I understand your issue with regards to opening in a new page. I’m guessing what you are seeing is the article opening within the page you were already on?

As a fix for this, create a new menu item for the K2 category within a ‘hidden’ or ‘ghost’ menu. This should then force the K2 item to open on a new page rather than within the current page. This has been a bug for some time it seems.

  • Nope, it's not working buddy, the k2 article is still opening on the same page :( – Joe Jul 22 at 6:40
  • Otherwise, if you may know how to remove the "/component/k2" part from the URL if the linking with the menu is done via method 1) (e.g. via "JA K2 Filter" --> "Items List"), this could also be an option. – Joe Jul 22 at 7:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.