First, I would like to thank you all for taking time to read and answer my question. I really appreciate it!
I have an issue to hide content from a view on a side bar. We created in the past a related view that is only used to link different content types such as project, publication and blog.
I added the content type profile to the view the related project, publication or blog from each user example: [link]http://institute.smartprosperity.ca/profile/scott-mcfatridge As you will see here, you are able to see the Related Work of the user (tiles). But the problem is coming from what I cold the 2nd link. When you are one the page linked, example the blog post on “The Buck Stops Here: How to Pay for Species at Risk Conservation in Canada” [link]http://institute.smartprosperity.ca/content/buck-stops-here-how-pay-species-risk-conservation-canada
On the left side bar, just after shareable button, you will see the Related. I want to hide the profile (the second link) and only show the other content type of document (blog, publication or project).
In other terms, I want to output the $ content[‘field_related’] on profile pages only, but not on other pages.
I am on Drupal 7. The actual code on my tpl for each type of content is
<?php print render($ content['field_related']); ?>
I tried different way and I know I am close, but I am not a web dev.
<? if ( $ node->type == 'profile' ) {print render($ content['field_related']);;} ?>
I hope I gave all information requested to answer my question.
Feel free to contact me.