1

I'm new here and hope it is the right place for asking my question.

My problem is as follows:

I need to provide 2 view modes of one and the same content type via url. So I installed and configured the module "view mode page", which do the trick for me, but not with the desired and expected url pattern. I hope someone has experiences with this module and can help me to find the correct url pattern.

I use Drupal 7.41 and view mode page 1.7.

I will show you what I mean...

It is a blog page which should get 2 different view modes and layouts.

The original Blog page is available with this url:

"www.exampledomain.de/de/2016/01/29/example-node-alias"

The corresponding Pathauto url pattern is:

"[node:created:custom:Y]/[node:created:custom:m]/[node:created:custom:d]/[node:title]"

I read the documentation page for this module "view mode page" and searched for help via google, but I found nothing helpful. In the documentation page are following examples to explain how to use wildcards (%) in url pattern for this module:

If Pathauto url pattern is: "project/[node:title]"

The view mode page url pattern should be: "project/%/my-view-mode"

If Pathauto url pattern is: "category/[node:field-category]/[node:title]"

The view mode page url pattern should be: "category/%/%/my-view-mode"

"[...] The wildcard character should be used for variable parts of the alias. This may be the NID, but it could be other things. [...]"

So with that in mind I tried to configure my own url pattern as follows:

"%/%/%/%/my-view-mode"

This throughs a error message similar like this (translated from german): "The URL pattern should not begin with wildcard"

So I tried it like this: "/%/%/%/%/my-view-mode"

If I use this url "www.exampledomain.de/de/2016/01/29/example-node-alias/my-view-mode", I get a 404 error.

Only if I use following url pattern: "node/%/my-view-mode"

And open the page as follows: "www.exampledomain.de/de/node/1234/my-view-mode"

It works and shows the correct view mode page.

What is wrong with my first and desired url pattern? How can I make this or a similar one work?

Thank you very much for any advice and sorry for my possibly bad English.

Best regards.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.