1

How to create hook_menu to display node view mode?

node/% - full view mode (default)

node/%/subpage - custom created view mode of this node, for example "subpage"

I've tried this: How to render custom view mode in d7 but it doesn't work. Maybe something is wrong with the code?

1 Answer 1

1

There is a module exists that does just that: View Mode Page.

Check it out and inspect the source to see how it works.

Your Answer

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

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