3

Should Views (that are setup as a Page) be able to inherit breadcrumbs/block visibility settings? When I create a Views page, set a path, add it to the menu (then adjust it to be a sub-menu of another parent item), when I am on the actual Views page, it looses (in this case) any block settings that should be shown on this page. From the screen shot below, you can see the menu block disappear (as well as the LEAD logo on the lower left side). More odd than that, is whenever I set the View to be added to a menu (as I have done in the Views settings), it doesn't show up (which is why I had to add it to the menu manually). I've gotten it to work with another Views page (the menu link showing up), but the blocks still disappear.

Also, once you click on an individual node, they also loose any type of breadcrumb/block visibility (even though I've set the URL to be the correct breadcrumb /about/faculty-staff/directory/USER_ID). Any help would be greatly appreciated. Thanks!

Current setup: Drupal 7.5 Views: 3.0-rc1 Menu Block: 2.2

screenshot

Screenshot Explanation:

Directory page (Views page - blocks missing from this page)

Main Faculty & Staff page (parent page)

User Profile view

Views config

Menu list

Menu config

5
  • The first thing to do is update to Drupal v7.9, your Views and Menu block look current. also, please clarify that you do not have any articles, pages etc. with the same URL. You can edit your question to reflect any changes in conditions this brings.
    – Ashlar
    Nov 4, 2011 at 20:47
  • Hi @Joes, Was fearing that'd be the answer ;) Views hasnt' come out with another RC in quite some time and hate to be mixed in with the madness of a development version - I'm assuming this wouldn't be a core Drupal issue... but maybe its' a combo of all of these freaking out. Thanks again.
    – Zach
    Nov 7, 2011 at 17:02
  • Let us know if upgrading fixes the problem. Note that interim upgrades usually fix bugs and do not add features. Each new upgrade is an improvement not a renewed risk. Moving on to a new Major version such as from 7 to 8 includes new features and more caution is advised.
    – Ashlar
    Nov 7, 2011 at 20:13
  • Hi @Joes I upgraded Drupal to 7.9 as well as Views to the latest dev - but the issue is still there. I did some searching... drupal.org/node/1069502 could this be a core issue? Does my original question make sense? Nodes that are called from a Views listing should keep the block visibility settings of the View itself as long as their path is specified to match the Views page? Thanks.
    – Zach
    Nov 11, 2011 at 20:19
  • That link does look like the same breadcrumb problem. As for the blocks disappearing, you may have two issues here. What theme are you using? Have you tried another to see if anything changes (try seven theme - its very basic). I agree that the view settings should work, blocks are dumb, I don't think they change anything. The block is apparently not being called (why? :}). You may need to start backtracking the call for the blocks through the templates (something I am only beginning to research). I'm very interested in where this issue goes.
    – Ashlar
    Nov 12, 2011 at 14:45

3 Answers 3

0

To your first problem, the menu disappearing on about/faculty-staff/directory:

  • Check how the menu block is configured.
  • Check if there is another menu item in another menu that links to this page. It could be that Drupal picks this up and thinks we are in another menu.

(There is a more general solution that I am going to post in another answer)

0

A generally useful way to fix all of this:

  • Use Crumbs to generate the breadcrumbs.
  • Use Menupoly instead of Menu block, to have your submenus expand for items that are in the breadcrumb trail, even if the current page itself is not in any menu.

Configure Crumbs (7.x-2.*):

  • Visit the configuration at Admin > Structure > Crumbs > Plugin weights,
    Make sure the menu plugin for this specific menu is enabled (or some parent plugin wildcard key). If necessary, give this specific menu a higher priority than other menus.
  • Go to Admin > Structure > Crumbs > Entity parent > User,
    Set about/faculty-staff/directory as the parent path for users with "staff" role.
  • Alternative: Use the "Path alias" plugin, where the parent path is based on the url alias.

Note.
You could also use Easy Breadcrumbs or Breadcrumbs by path to get breadcrumbs based on url alias. This would be equivalent with only having the "url alias" plugin enabled in Crumbs. But it does not do anything else, and it does not support Menupoly.

Define the menu with Menupoly:

  • Create a custom module
  • Implement hook_menupoly(). See the example module for inspiration.
  • Go to Admin > Structure > Blocks, and move the newly created menupoly block to the sidebar.

E.g.:

/**
 * Implements hook_menupoly()
 */
function MYMODULE_menupoly() {
  return array(
    'sidebar_menu' => array(
      'menu_name' => 'main-menu',
      'expand' => MENUPOLY_EXPAND_ACTIVE,
    ),
  );
}

Good luck!

0

The reason behind disappearing of block is still not able to find region in pages just like page.tpl.php.

Suggestions:

1) Create a custom template for views page using theme_preprocess_page in template.php.You have to create template using theme_hook_suggestions under the condition of views page url.

2)Assign or create region in new views page template.

3)Assign your menu block in above region.

Note: You don't need to edit or create any views template like views.tpl.php.It should be custom just like page.tpl.php.

Also block visibility settings should be available to views page url

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.