What conditional shall I use to hide certain things only when viewing the /register page?
Request for a conditional....
Collapse
X
-
Really depends on what you want to hide but most likely you'll need to edit the actual HTML. If it is a required field (any fields shown by default), you might have to edit the API as well.Translations provided by Google.
Wayne Luke
The Rabid Badger - a vBulletin Cloud demonstration site.
vBulletin 5 API -
Hi Wayne, I am looking to hide the advertisements and the guest notice on the registration page. I have no problem editing the actual HTML. "<vb:if condition="THIS_SCRIPT != 'REGISTER'">hidden content</vb:if>" is no longer supported in VB 5.1... Does anyone know which conditional I should use?Comment
-
Try adding this to debug and list the available variables and check what you can use.
Code:<pre>{vb:debugvardump page}</pre>
Comment
-
It brought back some pretty nifty results. here are the first 10 or so...
Code:array(34) { ["pageid"]=> string(1) "3" ["parentid"]=> string(1) "1" ["pagetemplateid"]=> string(1) "6" ["title"]=> string(8) "Register" ["metadescription"]=> string(28) "Forgot and Retrieve Password" ["urlprefix"]=> string(8) "register" ["routeid"]=> string(2) "13" ["moderatorid"]=> string(1) "0" ["displayorder"]=> string(1) "0" ["pagetype"]=> string(6) "custom"
Code:< vb :if condition="$page['pageid'] == 3" > (sorry, I had to break it in order for it to show....)
-
-
I think it would be safer to use the urlprefix since the chance of it getting changed in the future is remote. With pageid, it might change when you re-install or upgrade your site.
Code:<vb:if condition="$page['urlprefix'] != 'register'"> <!-- hidden content for registration page --> </vb:if>
👍 1Comment
-
I think it would be safer to use the urlprefix since the chance of it getting changed in the future is remote. With pageid, it might change when you re-install or upgrade your site.
Code:<vb:if condition="$page['urlprefix'] != 'register'"> <!-- hidden content for registration page --> </vb:if>
Comment
Related Topics
Collapse
-
by klaj3981I am having trouble getting this to work. My goal is to hide ads and the visitor message from the REGISTER page.
I have tried the following conditional so far, it has not worked for me....-
Channel: Support Issues & Questions
Mon 14 Apr '14, 3:56pm -
-
by unixmanQuick templating question. In the template markup below, I create a new array called "testArr", and attempt to populate it by calling array_merge. The first debug statement shows a properly...
-
Channel: Support Issues & Questions
Mon 28 Nov '16, 9:58am -
-
by WhiskeyOSSIf i try to make a post in our forums it will not display once the post has been saved even if I use the [html blocks it will not show and I am sure I have the settings set for them what am I missing...
-
Channel: Support Issues & Questions
Fri 11 Jan '13, 1:39pm -
Comment