Skip to main content
improved formatting
Source Link
AjitS
  • 10.9k
  • 7
  • 41
  • 73

I have 3 view modes (teaser, presentation and full view mode). I have created a node--content-type.tpl.phpnode--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 {}).

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.modulepremium.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 into<?php print $denied_message; ?> into the node--content-type.tpl.php?node--content-type.tpl.php? or what do I need to do?

Thanks in advance.

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 into the node--content-type.tpl.php? or what do I need to do?

Thanks in advance.

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.

Source Link

I am unable to show the access denied message of the premium content module. How can I do this?

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 into the node--content-type.tpl.php? or what do I need to do?

Thanks in advance.