I have a 'dummy' page for the menu node to point to for Menu A and have the URL set to /menuA in this dummy page and have no Domain Path set for each domain.

I then create for each site the page of content for Menu A and have it's Domain Path for that site set to /menuA and leave the URL Path Settings as automatic.

This works for allowing me to get to the correct pages for the content based on if it's published for that domain, but what isn't happening is that the Menu CSS isn't triggered so that I can see what menu is active based upon the content page. I believe this is because the menu code is looking at the URL Path Settings to trigger and not the Domain Path which is correct in the URL for the content page.

Is this something that can be addressed with Domain Path, or is this a issue with Drupal Core?

Thanks!

http://www.bluebonnetcountrygc.com to see an example of what I'm talking about.

Comments

grndlvl’s picture

Status: Active » Closed (works as designed)

I have tested this and all seems to be working as expected...

I have created a page that is associated with two different domains with two different paths per domain, with the single piece of content associated with both domains.

I was able to use the alias (/my-content for domain1 && /my-content-foobar for domain2) and the system paths(/node/1) in the menu and all rewrote to the current domains alias of the content and displayed as active in the menu.

On another note if you are expecting Drupal set the menu item as active based on an absolute URL such as domain1.org/my-content then yes you are right it currently does not do that. As far as enabling this feature for absolute paths... this just isn't part of Drupal core currently. :/

If I completely missed your issue, apologies, but I am having a little trouble understanding the issue exactly.

dshaw66’s picture

Hrm, maybe I can explain it better. I think I may have lost you.

Course Map Menu --> /content/course-map

Dummy Course Map Page (URL Path = /content/course-map - page is available to both domains and has no content and there are no Domain Paths set)

Course 1 Map page (URL Path = /content/course1-map, Domain Path = /content/course-map)
Course 2 Map page (URL Path = /content/course2-map, Domain Path = /content/course-map)

When you click on Course Map Menu depending on the domain you're on, it will go to the correct content page that is published for only that domain. This issue is that when you're on that page with the Domain Path that equals /content/course-map but the URL Path is equal to /content/course1-map the menu's CSS doesn't kick in so you don't see which active menu you're on when viewing the content page.

Hope this clears it up. Thanks

grndlvl’s picture

Status: Closed (works as designed) » Active

Setting back to active. Will look at this soon.

dshaw66’s picture

Have you had a chance to look into this? It's still an issue for me. Thanks!

dshaw66’s picture

Any luck?

grndlvl’s picture

I am sorry but this still goes back to my original answer, I think.

What are you using as you paths in the menu items?
If it is "/content/course-map", which is what it sounds like, that is the way Drupal core functions. It grabs the contents of "$_GET['q']" to do it's comparisons and in the case of nodes it would be "node/###", which is what should be used for menu items. http://api.drupal.org/api/drupal/includes!theme.inc/function/theme_links/7

My suggestion would be to create two different menus for the domains and specify the primary menu accordingly for the domain settings.

dshaw66’s picture

I would have to make 20+ menuing systems for the 20+ golf course websites we have. They all share most of the same menus so it makes more sense to use this module to have the primary URL for the course menu page be /course/759-content and the Domain Path URL be /course/content which points to a common dummy page.

So there's no way to make some way for the domain path appear to Drupal as the active menu node? So everyone who runs Domain Access creates a separate menuing system for each site? I can't go back and re-engineer it at this stage. Guess we'll live without active menus.

agentrickard’s picture

@dshaw66

It's more a case of "having this type of reliable path aliasing per domain is new, so people haven't tried to do what you're trying."

It would be more productive if you could try to explain what the code is failing to generate. In particular, if you can track down which API function is not interpreting the URL correctly.

Perhaps it's http://api.drupal.org/api/drupal/includes!menu.inc/function/menu_set_act... or http://api.drupal.org/api/drupal/includes!menu.inc/function/theme_menu_l...

I don't know, and it's hard to debug if you don't know where to look.

agentrickard’s picture

Status: Active » Postponed (maintainer needs more info)
alexanderpas’s picture

Status: Postponed (maintainer needs more info) » Active

l() fails to detect domain specific aliases.

l('Home', '<front>'); //sets active class on front page
l('site-wide alias', 'site-wide'); //sets active class on /site-wide
l('domain-specific alias', 'domain-specific'); // fails to set active class on /domain-specific (but the page does show up.)

also, drupal_get_path_alias() shows for example node/4, when accessing trough a working domain specific alias.

alexanderpas’s picture

Category: Support request » Bug report
Issue summary: View changes
mably’s picture

Status: Active » Closed (outdated)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.