XF 1.5 Conditional Statements- register/register page

ActorMike

Well-known member
We use the following conditional statement to prevent google ads from showing on certain pages and to certain users of the site.

Code:
<xen:if is="!{xen:helper ismemberof, $visitor, 3, 5, 12, 15, 10, 11} AND !in_array({$contentTemplate}, array('message_page', 'error', 'search_form', 'search_form_post', 'search_form_profile_post', 'search_results', 'register_form', 'register_confirm', 'register_facebook', 'register_twitter', 'register_google', 'login', 'login_two_step', 'error_with_login', 'contact', 'forum_watch', 'account_upgrades'))">

Typically I just search the source code of the page in question for the <div id="content" class="error"> line to find out what page to list above. The register/register page has <div id="content" class="error"> so shouldn't it be excluded from showing the ads? It works on all the other pages above. Works fine on the register_confirm page and other registration pages, just not the register/register page that get after submitting their registration.
 

ActorMike

Well-known member
After submitting?

From memory, isn't that the register_confirm template?

register_confirm is already listed in the conditional statements. No, that is the page they get after they click on the email to confirm the account, and it is not showing any ads, as expected. This is the very first page after they sign up.

Here is a video capture:

 

ActorMike

Well-known member
It's: register_process

Just inspect the page and look at the id="content" div:

Already did that, and it says <div id="content" class="error"> on the /register/register page on my site when I view the source, and error is already included in our conditional statements from excluding.

Update: I just did another test registration, and the ads are gone now! Crazy! You can see in the video above, they were showing earlier. I have not changed anything since I did that screen capture, and error page has been on the conditional statement for a while already. Also, weird that the register/register page is labeled as ERROR too instead of something like register_confirm.

Screenshot 2017-12-17 23.59.46.png
 

ActorMike

Well-known member
Here is a video with my source- the ads are gone now, which is good, but weird that my register/register page is <div id="content" class="error" instead of <div id="content" class="register_process"

 

ActorMike

Well-known member
I think there was also an ad code entered in a template for ad_above_contentregister_process which was causing the problem! I removed it. I was trying to edit the above content ad code.
 
Top