Page 1 of 1

<!-- startif --> syntax in Custom content

Posted: Tue Apr 18, 2006 5:50 pm
by scotch33
Hi - I need three options in my custom content -

1 -  a message to non registered users
2 - a message to rgistered users pending approval (in my case the site owner approves by moving the registered user from 'pending' to 'member' groups)
3.  the content itself for approved members.

I can get two options playing, but the middle on is not playing.  I have tried elseif which didn't work, tried nesting the startif s and tried to end one if and start the next and that hasn't played either.  Can anyone help me - i am sure i am just being a bit dim.

???

Re: <!-- startif --> syntax in Custom content

Posted: Tue Apr 18, 2006 6:13 pm
by calguy1000
unfortunately, no you're not being dense on this one, the parser in customcontent is very ameteurish (I can say that, I wrote it :) ).  it doesn't support elseif, or nested if's.

Hmmm, you could do two seperate (but not nested) if statements though.  Something like:

Code: Select all

<!--customContent: startif group=Pending -->
Your membership is pending approval
<!--customContent: endif -->

<!--customContent: startif group=Members -->
You are authorized to see special stuff
<!--customContent: else -->
You are not yet authorized to see the special stuff.  If you have already registered, then you can ignore this message.  If you haven't already registered, then go to the registration page and sign up.
<!--customContent: endif -->

Re: <!-- startif --> syntax in Custom content

Posted: Tue Apr 18, 2006 6:35 pm
by scotch33
thanks mate, that will do me very nicely - implementing it now.