![]() |
Hiding content in the CMS with certain conditions.
I have a custom form in a static page in the CMS, as well as some text.
In total I will have 3 forms but two of them I don't want to be seen by unregistered users and registered users must have 5 posts or more to be able to see the form. As the form is in a static page is there any code I can wrap around the form to do what I want? I don't really want to have to go down the route of faffing about creating a new usergroup and promotions and stuff, plus I don't want to block the whole page just the specific form bit so they can't submit untill they are registered with 5 posts or more! I know I need to us vb conditionals but what? As I have no idea what they are. |
I don't think you can use template vb:if tags in a static html page. But instead of putting html in the big text area you can leave it blank and just change the template name to a template you want to use (see this article: https://vborg.vbsupport.ru/showthread.php?t=236245).
|
I've sorted it thanks :) Using a vb condition.
|
Did you put a condition right in an html static page? I thought I tried that and it didn't work.
|
Na I made a copy of the template it calls and renamed it, and put this around {vb:raw $pagetext}
Code:
<vb:if condition="$show['member'] AND $bbuserinfo['posts'] >= 5"> |
All times are GMT. The time now is 01:27 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|