Posted by davey_b on November 22, 2012 at 12:08am
I have a node type that has a field on it that people can get access to if they pay to access that field on that node. I have a sample of the content (video, not porn!) that people can see but I want to be able to hide the sample field if a user has access to the payed for content. I think I'll need to put some php code in one of the tpl.php files but this is the first time I've done anything with a tpl.php file so would appreciate any pointers on what file to edit for the node and any thoughts on the php code that I might use to achieve this?
Many thanks
Comments
=-=
may want to look into the field permissions module
otherwise you will need to print your fields manually in the tpl.hp file and and perform an if statement to exclude or include the user role for paid or unpaid content
Yeah already looked at the
Yeah already looked at the field permissions module and what I want to do is beyond it. I was thinking exactly as you were saying re the. tpl file and an if statement but just looking for some pointers to get started.
Thanks