I have 3 view modes (teaser, presentation and full view mode). I have created a node--content-type.tpl.php
and created the code for each view mode using a conditional statement
if($teaser) {}
else if($node->type == 'tu_mooc' && $view_mode == 'presentation') {}
else {}
I have linked the 3 view modes. So I can go from the teaser to the presentation and from the presentation to the full view mode.
I have downloaded the premium content module so that access to the full view mode is limited to authenticated users. I made a small change in premium.module
so that anonymous users have access to both the teaser view mode and the presentation view mode. The problem I have is that when I try to access the full view mode (as an anonymous user) I don't get the access denied message. Instead I get the code that appears within the teaser view mode. i.e. In node/1 I get the teaser of node1 instead of getting the access denied message.
Do I need to include some code like <?php print $denied_message; ?>
into the node--content-type.tpl.php?
or what do I need to do?
Thanks in advance.