1

I've created page with Views, which is displaying gallery (image fields).

I've set the path to node/%/gallery.

Page is working when I access "http://example.com/node/9/gallery" but it doesn't work when I access it with alias "http://example.com/event/example-name/gallery"

Any ideas?

1

1 Answer 1

0

do not use node/%/.. as your path, this will disturb the default routing system.

change the view's path to gallery/% or something.

if you want to keep this url, register a local task like here How to add a local task tab to node view?

and in this page callback you can display the view with views_embed_view, in this case you will remove the path of the view, or change it to a test-path.

but still, the alias with /gallery needs to be registered too !

3
  • I want the path to behave like this subpage of the node. path-alias/gallery
    – user58282
    Feb 25, 2016 at 13:08
  • then you need to setup this path alias yourself using pathauto or redirect or register in a custom module in hoo_menu
    – rémy
    Feb 25, 2016 at 13:18
  • updated the answer with a link for registering a local task
    – rémy
    Feb 25, 2016 at 13:47

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.