By jsabater on
Hello everyone!
I'd like to know how I can hide the user's picture when showing a page of my type of content only. So, if the site has that feature enabled in user preferences, that is fine, but I want to hide it when showing my type of content. Same as unchecking the "Promote to front page" option when posting new content of my type, which I did in the hook_form_alter form.
Thanks in advance.
Comments
You could do it with
You could do it with theming. Copy node.tpl.php to node-{type}.tpl.php where {type} is your content type. For example if your type was 'bike' you would copy node.tpl.php to node-bike,tpl.php. Edit the copied file and remove the part that prints the picture.
What if I change theme?
But then I would be overriding the themes' layouts, wouldn't I? What I want is to keep the selected theme's layout, but just hide the image. Same as if I go to user preferences and disable pictures for users. The function must be somewhere as the behaviour is there. :)
As far as I know there is no
As far as I know there is no per content type setting for the user picture, only the global on/off switch at the theme level.