Page 1 of 1

nesting CustomContent tags

Posted: Wed Aug 30, 2006 9:40 pm
by jmcgin51
Can this be done?  For example, I want to make paragraph A available to users in group 1 and group 2.  However, there is some additional information (call it paragraph B) that I want to make available to group 2, but I don't want group 1 to see it.  I have CustomContent tags in my templates, protecting paragraph A, which happens to be my entire content block.  I want to add CC tags to only the page that has the paragraph B on it, but I'm going to end up with something like:

(tag from template)
paragraph A
(tag from page)
paragraph B

(tag from page)
(tag from template)

This doesn't seem to work.  All of my content appears when I'm logged in as a Group 2 member, but I also get the message that "this content is only available to Group 2".

what am I doing wrong?  is there a better way to accomplish this?

Thanks!

Re: nesting CustomContent tags

Posted: Wed Aug 30, 2006 9:51 pm
by calguy1000
No, the comment style tags can't be nested, but the CustomContent module exports a number of smarty variables so you can use smarty logic to accomplish this.

Re: nesting CustomContent tags

Posted: Thu Aug 31, 2006 12:25 am
by jmcgin51
ok, thanks for the response.  unfortunately, I'd have to be "smarty-er" than I am to know what to do with the Smarty variables.  I guess I'll work around it for now, creating two sections of text, one for Group 1 only, and 1 for Group 2 only (that includes the Group 1 text)

Re: nesting CustomContent tags

Posted: Thu Aug 31, 2006 12:35 am
by calguy1000
Check the customcontent help.  there's an example

Re: nesting CustomContent tags

Posted: Thu Aug 31, 2006 1:58 pm
by jmcgin51
thanks! that seems to work...

I had avoided using the Smarty tag version of CC because of a comment I read from you in a post on March 9, 2006, in which you said "Those tags aren't working properly yet, I'd work with the other tags."

I take they now work properly?

Also, in the CC Help, the "$" has been omitted from the variable name (for example, the Help reads "if customcontent_loggedin", but from other posts it looks like it should be "if $customcontent_loggedin".)  Does this make a difference in how the module works, or if it works at all?  I'm a Smarty dummy, so I apologize if this is a stupid question.

Is there a Smarty tutorial anywhere??

thanks again
torn

Re: nesting CustomContent tags

Posted: Thu Aug 31, 2006 2:27 pm
by calguy1000
you can find out all you'll ever want to know about smarty at http://smarty.php.net

The missing $ is probably a typo in the help.