Joomla! Discussion Forums



It is currently Fri Nov 27, 2009 6:48 pm (All times are UTC )

 


Forum rules

Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.



Post new topic Reply to topic  [ 25 posts ] 
Author Message
Posted: Tue Oct 27, 2009 9:19 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sun Apr 05, 2009 8:20 am
Posts: 17
Hello out there,

i have a "little" problem. I have set one menu point as blog view of a section called "sendungen". This sections consists of categories like "Schuljahr 2007/2008" ans so on. One for each school year. Our podcasts are categorized into this categories to have the possibility to select them by the year.

At the menu point "Sendungen" we want to have all podcasts listed. This works well. But if i select a podcast for details view, the menu point "Sendungen" loses his focus/trail because the podcasts belongs to the category "Schuljahr 2008/2009".

If i use this link: http://www.radio-gsg.de/sendungen/schul ... esuch.html it works like we want it to work, but Joomla doesn't set this link at the pages, so how to do this?

How can i prevent this to happen. Our goal is just to highlight the menu point even if a detailed view is active. How can we handle this?

http://www.radio-gsg.de/sendungen.html


Top
  E-mail  
 
Posted: Sat Nov 07, 2009 5:57 am 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Thu Jul 24, 2008 12:48 pm
Posts: 2067
Location: Austin, TX
I would try adding sub menu items for each of your categories under your section menu item. You can tell mod_mainmenu to only display one level, but I think this may tell Joomla! to highlight the parent menu item when the sub menu item is selected.

Let me know if this doesn't make sense. It's a little confusing.

_________________
Will Mavis - Joomla Extension Developer
http://www.cmsmarket.com/
http://www.sourcecoast.com/
If you think I can help you, feel free to PM me a link to your post and I will respond. Please don't hijack another user's thread. :D


Top
  E-mail  
 
Posted: Sat Nov 07, 2009 7:23 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sun Apr 05, 2009 8:20 am
Posts: 17
It make sense, but it doesn't work.

I'm surprised, if i'm the only one with this issue.


Top
  E-mail  
 
Posted: Sat Nov 07, 2009 2:57 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Thu Jul 24, 2008 12:48 pm
Posts: 2067
Location: Austin, TX
Can you inspect your page when you are on an article and see if they top menu item is being marked with a class that is different than when you are on the home page? mod_mainmenu uses active and current classes to make menu items and it's possible it is getting marked and you just need to add more CSS styles.

Most browsers have tools to help you inspect your HTML easily in case you don't already use them:
http://www.cmsmarket.com/resources/dev-corner/106-how-to-inspect-your-html-and-css

_________________
Will Mavis - Joomla Extension Developer
http://www.cmsmarket.com/
http://www.sourcecoast.com/
If you think I can help you, feel free to PM me a link to your post and I will respond. Please don't hijack another user's thread. :D


Top
  E-mail  
 
Posted: Sat Nov 07, 2009 5:02 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sun Apr 05, 2009 8:20 am
Posts: 17
I already inspected the whole code ;) The only class every menu link has if i view an article is "mainlevel-nav". So there is no class oder id where i could add some CSS code.

This is why i need to adjust the SEO links for links like www.domain.de/section/cat/article instead of www.domain.de/cat/article what it is now.


Top
  E-mail  
 
Posted: Sat Nov 07, 2009 5:20 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Thu Jul 24, 2008 12:48 pm
Posts: 2067
Location: Austin, TX
You are using the core mod_mainmenu module, correct? If so, I can take a look it that code and see if I can see a way to get this working like you want.

Let me know.

_________________
Will Mavis - Joomla Extension Developer
http://www.cmsmarket.com/
http://www.sourcecoast.com/
If you think I can help you, feel free to PM me a link to your post and I will respond. Please don't hijack another user's thread. :D


Top
  E-mail  
 
Posted: Sat Nov 07, 2009 5:53 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sun Apr 05, 2009 8:20 am
Posts: 17
Yes, i use the core mod_mainmenu module. It would be very nice if you could take a look at the code.


Top
  E-mail  
 
Posted: Sat Nov 07, 2009 6:05 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Thu Jul 24, 2008 12:48 pm
Posts: 2067
Location: Austin, TX
I started to open the files and then thought of something I had seen before. Take a look at your module and under Other Parameters there is one called Active Parent. Does turning that on change anything? If not, I'll keep looking.

_________________
Will Mavis - Joomla Extension Developer
http://www.cmsmarket.com/
http://www.sourcecoast.com/
If you think I can help you, feel free to PM me a link to your post and I will respond. Please don't hijack another user's thread. :D


Top
  E-mail  
 
Posted: Sat Nov 07, 2009 6:41 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sun Apr 05, 2009 8:20 am
Posts: 17
No, this doesn't change anything. I think this only affects the normal URLs, not the SEO ones.

I thought it must be something with the blog item view or the item link helper, because the links aren't what the have to be.

I tried to explain it here: viewtopic.php?p=1919606#p1919606 viewtopic.php?p=1904818#p1904818


Top
  E-mail  
 
Posted: Sat Nov 07, 2009 7:06 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Thu Jul 24, 2008 12:48 pm
Posts: 2067
Location: Austin, TX
Can you try to describe exactly what you are doing so I can try to reproduce it locally and then figure out the solution?

You have a Section Blog View as the main links, correct? Does it have Category Blog View sub-menu items under it for each category?

And then the issue is that when you click into an article from your Section Blog View that you want the menu item to continue highlighting but it is not.

Let me know if I missed anything.

_________________
Will Mavis - Joomla Extension Developer
http://www.cmsmarket.com/
http://www.sourcecoast.com/
If you think I can help you, feel free to PM me a link to your post and I will respond. Please don't hijack another user's thread. :D


Top
  E-mail  
 
Posted: Sat Nov 07, 2009 9:23 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sun Apr 05, 2009 8:20 am
Posts: 17
Yes, i use the Section Blog View for the link "Sendungen". First i had no Subitems for each category, but now, after your former help, i added them.

Second is also right, the menu item loses its highlight/focus, if i click into an article from the Section Blog View.

The reason is, the Section Alias is missing in the links of the articles. Now i need a way to add them or change the System. First way would be better and should be much easier, isn't it?


Top
  E-mail  
 
Posted: Sun Nov 08, 2009 2:45 am 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Thu Jul 24, 2008 12:48 pm
Posts: 2067
Location: Austin, TX
What is your mod_mainmenu Menu Style set to? I'm doing a little testing to see if I can figure out a way to do what you want.

_________________
Will Mavis - Joomla Extension Developer
http://www.cmsmarket.com/
http://www.sourcecoast.com/
If you think I can help you, feel free to PM me a link to your post and I will respond. Please don't hijack another user's thread. :D


Top
  E-mail  
 
Posted: Sun Nov 08, 2009 8:51 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sun Apr 05, 2009 8:20 am
Posts: 17
Style: Legacy – Flat List
Always show sub-menu Items: No
Menu Tag ID: None
Menu Class Suffix: -nav
Module Class Suffix: None
Maximum Menu Depth: 10
Expand Menu: No
Activate Parent: Yes
Full Active Highlighting:No – setting this to Yes also don't work. So i turned it off again


Top
  E-mail  
 
Posted: Mon Nov 09, 2009 5:54 am 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Thu Jul 24, 2008 12:48 pm
Posts: 2067
Location: Austin, TX
It looks like both Legacy - Horizontal and Legacy - Flat List will never use that Activate Parent parameter. You can see in the code below that the call from mosShowHFMenu doesn't even pass in the $open parameter to mosGetMenuLink:

.../modules/mod_mainmenu/legacy.php
Code:
function mosShowHFMenu(& $params, $style = 0)
{
   $menu = & JSite::getMenu();
   $user = & JFactory::getUser();

   //get menu items
   $rows = $menu->getItems('menutype', $params->get('menutype'));

   $links = array ();
   if(is_array($rows) && count($rows)) {
      foreach ($rows as $row)
      {
         if ($row->access <= $user->get('aid', 0)) {
            $links[] = mosGetMenuLink($row, 0, $params);
         }
      }
   }
...
function mosGetMenuLink($mitem, $level = 0, & $params, $open = null)
{
...
         if ($params->get('activate_parent') && isset ($open) && in_array($mitem->id, $open)) {
            $id = 'id="active_menu' . $params->get('class_sfx') . '"';
...


So, a few options.

Should we try List or Legacy - Vertical and force the styles to be a horizontal layout or do you want to investigate another menu module that does what you want or is there another option you can think of?

Let me know. Sorry for the bad news.

_________________
Will Mavis - Joomla Extension Developer
http://www.cmsmarket.com/
http://www.sourcecoast.com/
If you think I can help you, feel free to PM me a link to your post and I will respond. Please don't hijack another user's thread. :D


Top
  E-mail  
 
Posted: Tue Nov 10, 2009 6:53 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sun Apr 05, 2009 8:20 am
Posts: 17
Can't see any differents at the HTML Output, regarding the classes and ids. So just tell me what is the advantage if i use „List” or „Legacy - Vertical” instead of „Legacy - Flat List”


Top
  E-mail  
 
Posted: Tue Nov 10, 2009 3:39 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Thu Jul 24, 2008 12:48 pm
Posts: 2067
Location: Austin, TX
You can see the difference if you look at the code. This is the code that has the functions for the Legacy layouts:
.../modules/mod_mainmenu/legacy.php

The Helper class has the function that renders the non-Legacy layout:
...modules/mod_mainmenu/helper.php

I think the biggest difference for you is the fact that Legacy - Horizontal and Legacy - Flat List will never use that Activate Parent parameter.

I don't know that the other two (List or Legacy - Vertical) will do what you want, either, but I just wanted to make sure you were OK with using those before investigating if they will work.

There are other menu modules out there that might have the kind of functionality you want our of the box. You might want to check out a few of them before you spend a lot of time chasing down issues with the core menu module:
http://extensions.joomla.org/extensions/structure-a-navigation/menu-systems

If you want to keep looking, though, I'll keep helping. Let me know.

_________________
Will Mavis - Joomla Extension Developer
http://www.cmsmarket.com/
http://www.sourcecoast.com/
If you think I can help you, feel free to PM me a link to your post and I will respond. Please don't hijack another user's thread. :D


Top
  E-mail  
 
Posted: Tue Nov 10, 2009 4:23 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sun Apr 05, 2009 8:20 am
Posts: 17
Ok, i now understand :)
Well, i don't need the legacy mode for any Plugin or Layout. So the "normal" Layouts of the core menu modul are the ones i will use.

I will have a look at the other moduls mentioned in your post. I was wondering if this isn't a core functinallity.

But just some words. The problem should and could be solved by adjusting the parameters of the blog view item modul. Just remember the different kind of links i posted. The one with the sectino in it works like i want this to work. But per default the section isn't added to the Title links of the items. This is what we have to solve i think.
JanMalte wrote:
This is why i need to adjust the SEO links for links like http://www.domain.de/section/cat/article instead of http://www.domain.de/cat/article what it is now.


Top
  E-mail  
 
Posted: Tue Nov 10, 2009 4:23 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sun Apr 05, 2009 8:20 am
Posts: 17
Ok, i now understand :)
Well, i don't need the legacy mode for any Plugin or Layout. So the "normal" Layouts of the core menu modul are the ones i will use.

I will have a look at the other moduls mentioned in your post. I was wondering if this isn't a core functinallity.

But just some words. The problem should and could be solved by adjusting the parameters of the blog view item modul. Just remember the different kind of links i posted. The one with the sectino in it works like i want this to work. But per default the section isn't added to the Title links of the items. This is what we have to solve i think. But it only works with the Legacy Flat List.
JanMalte wrote:
This is why i need to adjust the SEO links for links like http://www.domain.de/section/cat/article instead of http://www.domain.de/cat/article what it is now.


Top
  E-mail  
 
Posted: Wed Nov 11, 2009 2:38 am 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Thu Jul 24, 2008 12:48 pm
Posts: 2067
Location: Austin, TX
So if we can get the section to show up in the URL, everything works correctly?

I looked back through the thread but didn't see if you mention if you are using a 3rd party SEF extension like sh404SEF. If so, let me know. Either way, I can try to figure out if there's a way to force the section to be added to the URL.

_________________
Will Mavis - Joomla Extension Developer
http://www.cmsmarket.com/
http://www.sourcecoast.com/
If you think I can help you, feel free to PM me a link to your post and I will respond. Please don't hijack another user's thread. :D


Top
  E-mail  
 
Posted: Wed Nov 11, 2009 8:43 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sun Apr 05, 2009 8:20 am
Posts: 17
No, i just use the core function for SEF. And yes, then it works correctly. But just with the legacy menu styles. But this is ok.

It would be really nice, if you could look for a solution.


Top
  E-mail  
 
Posted: Wed Nov 11, 2009 4:58 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Thu Jul 24, 2008 12:48 pm
Posts: 2067
Location: Austin, TX
I will look into it and let you know what I find.

_________________
Will Mavis - Joomla Extension Developer
http://www.cmsmarket.com/
http://www.sourcecoast.com/
If you think I can help you, feel free to PM me a link to your post and I will respond. Please don't hijack another user's thread. :D


Top
  E-mail  
 
Posted: Thu Nov 12, 2009 4:47 am 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Thu Jul 24, 2008 12:48 pm
Posts: 2067
Location: Austin, TX
That routing stuff can get pretty confusing.

Here's what I found. You can see the router.php file that com_content uses here:
.../components/com_content/router.php

On my test site, I created a brand new section, with a new category, and a new article. I added a section blog layout menu item to my new section in my top menu (with alias section-link). When I click on the top menu, this is the link it takes me to:
http://localhost:8080/joomla1515/section-link
When I click the Read More link for the article, it takes me here:
http://localhost:8080/joomla1515/section-link/34-new-category-title/48-nowhere-article

And, thus, the menu item stays highlighted.

I believe that router.php file actually scans through menu items looking for a match. If it finds a direct match to that article, it is going to use that link before linking to the section/category/article link.

Do you link to that article in any menu?
Do you link to that article's category in any menu?


Let me know. If you can't figure out what's going on, I will continue to try to help.

Those router.php files are very confusing! :D

_________________
Will Mavis - Joomla Extension Developer
http://www.cmsmarket.com/
http://www.sourcecoast.com/
If you think I can help you, feel free to PM me a link to your post and I will respond. Please don't hijack another user's thread. :D


Top
  E-mail  
 
Posted: Fri Nov 13, 2009 10:36 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sun Apr 05, 2009 8:20 am
Posts: 17
Hello, thanks for looking for it.
Yes, i use a second menu to link to the categories. The articles aren't linked anywhere. After deleting this it works like we want it to have :)
Thanks a lot.

But is there a way to also provide links to the categories itself with working readmore links? Or is the only solution to add a menu with "standard" http links to the categories?


Top
  E-mail  
 
Posted: Fri Nov 13, 2009 3:23 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Thu Jul 24, 2008 12:48 pm
Posts: 2067
Location: Austin, TX
I'm not sure I understand your question.

Isn't this a link to the category?
http://www.radio-gsg.de/sendungen/46-schuljahr-20092010.html

It seems like the read more link is working there.

Let me know if I'm missing something.

_________________
Will Mavis - Joomla Extension Developer
http://www.cmsmarket.com/
http://www.sourcecoast.com/
If you think I can help you, feel free to PM me a link to your post and I will respond. Please don't hijack another user's thread. :D


Top
  E-mail  
 
Posted: Fri Nov 13, 2009 4:56 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sun Apr 05, 2009 8:20 am
Posts: 17
Yes, but i set the links by copying the url into the menu, using external links ;)
But it works, not the best way, but it works.

Thank you very much for your great help.


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ] 

Quick reply

 



Who is online

Users browsing this forum: birdland, day, Google [Bot], hazel09, zoomlanski and 39 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group