开发者

Drupal Linking changing menu paths based on page parameter

I have a number of views that accept node Ids as arguments and have registered page paths, e.g. someview/%nodeId开发者_开发百科, anotherview/%nodeId, etc. I want to have a menu which displays on the node page that links to these views for the current node. So node/123 should have a menu that links to someview/123, anotherview/123, and so on.

I could make a block that will do this, but I'd rather have it use the existing menu system so it fits into the existing theme styling. Is there a way to do this?


As I understand, you need to create a menu with dynamic parameter/argument "nodeId" added to paths of menu items.

There are (at least) two ways to do it:

Create a menu with dynamic parameter

This module should be helpful for you: Menu token

When you have this dynamic menu created, you can just put it into a block that will be activated on the particular content type pages (this could be set in block settings).

Create a view that will generate a menu

Another way is to create a view with nodeId as agument and style it to fit to existing menu system.

Maybe would be helpful: Menu Node Views

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜