nesting CustomContent tags

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

nesting CustomContent tags

Post 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!
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: nesting CustomContent tags

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: nesting CustomContent tags

Post 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)
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: nesting CustomContent tags

Post by calguy1000 »

Check the customcontent help.  there's an example
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: nesting CustomContent tags

Post 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
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: nesting CustomContent tags

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Post Reply

Return to “CMSMS Core”