Hi,
I've created a new custom view mode for nodes, and it works great. My theme's templates named node--BUNDLE--VIEW-MODE.tpl.php are found and render exactly as I expect. However, I can't figure out how to get a template working for users. I've added the new view mode, defined user--user--VIEW-MODE.tpl.php, and cleared the cache, but it just doesn't seem to take. It _does_ render using the settings I set up through the UI, so certain fields are hidden and the ordering is what I want, but I need a little bit more control.
Is it possible to use templates for custom view modes on user entities? If so, what is the proper naming convention for the template files? If not, are there any workarounds you could suggest?
Thanks,
Noah
Comments
Comment #1
lex0r commentedSubscribing.
At the moment it is user_profile theming function that prevents node-like view mode template suggestions. It is only possible to define view mode templates in this way:
And you will have to name your templates like user-profile--viewmode-name.tpl.php.
This could be possibly moved to module's preprocess_user_profile.