2

Making a joomla 3x website, testing it locally in wamp.

My main menu layout is: Home | News | [and so on...]

News page includes the "Popular Tags" module which displays most popular tags. If I click on a tag from that module, it brings something like tag search with all articles with such tags to be selected.

Now the problem I have is that it takes me back to the home page. It turns the "home" menu active from "news" and then the article loaded appears under "home" instead of under "news".

URL-wise this is how it looks:

News = http://localhost/joomla/index.php/newsfeed

-> click on tags

http://localhost/joomla/index.php/component/tags/tag/7-taghere (As you see it already went to home)

-> click on an article

http://localhost/joomla/index.php/79-blog/78-post-2 (loaded in home)

meanwhile if I click an article straight from the news page it goes like this:

http://localhost/joomla/index.php/newsfeed/78-post-2

How can I control this? I tried to look for some "parent" setting like Menus have but sadly articles have no such setting...

Ultimately what I want to achieve is to limit the whole thing to news menu page so it wouldn't switch to home throughout the procedure. I note that when it goes to home it actually doesn't really show the home itself, but it does change the menu "button" to home and the URL is made from home.

Any help here would be appreciated.

6
  • The update of your question is a whole different thing than your initial question - especially comparing it with the title. Your initial question was all about urls and nothing about creating layout. If the answer solves your main question, but then you have a new problem/issue to solve, then I would suggest to ask a new question.
    – FFrewin
    Aug 10, 2015 at 13:54
  • + plus the fact that your update confused me a bit, especially this part: "...simply using article categories, which is not a module I can't include inside article content code is not good for my design." So how you first approached the fact that you want to have a blog articles listing?
    – FFrewin
    Aug 10, 2015 at 13:59
  • The issue why you access your content from the home menu item is explained in my answer, maybe indirectly but explained through giving the solution to your initial problem. In a few words to show content in Joomla under specific menu item id, you need to have the required menu item that will hold/link that particular content. In your configuration the only menu item you have is to hold an article. Joomla won't care if in your page you inject modules with links to other content to show them from that same item id, will look if there is an itemId for that content, if not it will show at home.
    – FFrewin
    Aug 10, 2015 at 14:26
  • Furthermore, you didn't mention in your initial question your approach of creating a blog page and in your update where you mention the newsflash module doesn't say a lot. Whatever the case, you can still use a category blog menu item and have it show the modules you want, instead of the component's output. In menu item settings set the number of articles to 0, and then publish your modules at the main content position (if your templates support as such position).
    – FFrewin
    Aug 10, 2015 at 14:31
  • Let us continue this discussion in chat.
    – FFrewin
    Aug 10, 2015 at 14:32

1 Answer 1

2

You can control this by creating menu items first for the Joomla articles category (blog/newsfeed or whatever), then for the tag component itself.

1. JOOMLA CONTENT

You want to have a page where the articles posted under the blog category will be displayed under the same URL scheme, like www.domain.com/blog/article-title.

For this you need to have a Category Blog menu item and set its category to the top category of your Blogs category section.

Now this category page will be accessible from the following url scheme:
www.domain.com/blog-menu-item-alias

Also, all articles of this category (unless they are linked directly with a menu item, or they belong to a category that is associated with another menu item that takes precedence over the one you just created check here for more info on this), will be accessible through the same scheme, disregarding from where they are linked:

www.domain.com/blog-menu-item-alias/article-alias.

2. TAGS

Now to also control the where the tagged items will be accessible, you need the following:

A Tagged Items menu item (tags component), which you have to set it to display tagged items from all your tags.

If you want to display the listed tagged items, below the Blog menu item, then I would advise you to set the tags menu item as child of the your Blog menu item (set blog menu item as parent of the tags one).

Now when you click on one tag from your module, the Tags Items page will be displayed with the Blog articles items as parent.

Each article you click from this page, assuming it belongs to one of the blog categories, will be accessible following the above URL scheme, of the blog category, since it will be linked through that menu item:
www.domain.com/blog-menu-item-alias/article-alias.

However, here you may face a small issue, if you are still creating new tags while you are creating new articles, as the new tags won't be included in your tagged list of items.

One possible workaround is to define a standard list of tags that you want to use from within the tags component, select them all in your Tags menu item, and disable the AJAX creation of new tags from inside the com_content component, and use only tags from your list.

Otherwise, if you are creating new tags and those are not included in your tags menu item, most likely they will be displayed again under the home menu item - it won't affect where the actual article will be accessible though.

*The more advanced approach would be to create a custom menu item / override for the tags component, which will use all the tags by default, without the need to select them one by one.

**The above will take you closer to what you are after, I wrote them at once and in a hurry, so let me know if there is any non-sense anywhere or you need further explanations.

2
  • Thanks so much for such elaborate response! I will check it out and report if I am able to actually implement this.
    – Borg777
    Aug 10, 2015 at 12:19
  • Assigning to the menu item was the key here and when FFrewin explained that to me I have managed to control the URLs as needed. Using menu with dropdowns and not really wanting to modify it by putting like a menu with just one button without any dropdowns to hide all articles there. I went another way in the end - I have made a whole new menu that holds only blog posts. It's not positioned anywhere on the page through template at all. Result? No buttons are "active" when I go to a blog post and additionally - the url path for each of the blog posts goes right after index.php. Good stuff.
    – Borg777
    Aug 10, 2015 at 16:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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