Closed (fixed)
Project:
Protected Node
Version:
5.x-1.2
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
8 Oct 2008 at 05:53 UTC
Updated:
22 Oct 2008 at 19:54 UTC
Hello,
I'm trying to put a DIV and a class around the protected node when it is viewable anywhere in Drupal i.e. in the search results or when a protected node is in preview mode via a taxonomy. Putting a class around the protected node will increase the usability of this great module so that users who stumble upon the protected node will know the node is password protected.
I was thinking I would place the Div and class in node.tpl.php somewhere or would it go into the module itself? I'm a theme designer not a programmer so forgive my lack of knowledge.
I tried to put the below code in my node.tpl.php but it didn't work.
<?php if($node->protected_node) {
print "<div class=\"teaser_lock\">Hello, This Node is protected!</div>";}?>
Thank you
Comments
Comment #1
mtolmacs commentedTry this:
Comment #2
Grimlock commentedYes! This works thanks a million :)
Comment #3
mtolmacs commentedThanks for using it! ;)
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.