1

I already have code that will take a path such as www.example.com/site/123/campaign/456/mynodealias. It loads the aliased node with extra arguments, site and campaign, which could change at any time and could be potentially thousands of them.

I now need to display a menu that links to paths like the above. For example, let's say I start on the path www.example.com/site/123/campaign/456, and I have two nodes (mynodealias1, and mynodealias2). I would need a menu with links to my custom paths:

  • www.example.com/site/123/campaign/456/mynodealias1
  • www.example.com/site/123/campaign/456/mynodealias2

Do you have any suggestion about the best way to go about this?

3
  • Let's see if I understood. You have code that handles pages with a URL like www.example.com/site/123/campaign/456/mynodealias1, and you want to know how the page at www.example.com/site/123/campaign/456 could generate the links to the pages at www.example.com/site/123/campaign/456/<node alias>. If that is the case, are there restrictions about which node aliases should be used? For example, are the node aliases just for nodes of specific content types?
    – avpaderno
    Commented Nov 10, 2012 at 19:56
  • The alias could in fact be anything. Suppose I have a menu item: $items['myitem'] = array('title' => 'my item'); I would like to access this at: www.example.com/site/123/campaign/456/myitem, plus a menu to be available to the user that has the site and campaign urls. Or maybe I should have a menu item $items['site/%/campaign/%/myitem'] = array('title' => 'my item'); The main issue is generating displaying the menu with the extra arguments populated in the url.
    – Oliver P
    Commented Nov 20, 2012 at 11:04
  • I think the answer lies with the Persistent URL module (PURL). I've been having a look at Open Atrium and the Organic Groups functionality which is similar to what I need. i.e. Similar urls for pages but prefixed with the group identifier.
    – Oliver P
    Commented Nov 20, 2012 at 11:34

0

Your Answer

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

Browse other questions tagged or ask your own question.