3

I've got a link to the mobile version of my site in the footer, but I need this link to be dynamic based off the page that the user is currently on.

Shown below are the options I have for the link.

enter image description here

Under the path there is this help text

The path for this menu link. This can be an internal Drupal path such as node/add or an external URL such as http://drupal.org. Enter <front> to link to the front page.

What I need is similar to the ability to use <front> to signify the homepage. I'd like to be able to use something like http://m.example.com/<node> so that this link will always go to the mobile version of the page that I'm currently on.

Is this possible? Or is what I want to do more complex than just using a keyword for the path?

1 Answer 1

2

The default menu system won't let you do that...but if you install the Menu Token module you should be able to use a path similar to the following to get what you need:

http://m.example.com/[current-page:url]
1
  • 1
    Perfect, does exactly what I need. I ended up using [current-page:url:relative] to get what I wanted. Many Thanks
    – Novocaine
    Commented Jul 25, 2013 at 10:56

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.