vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   CMS conditional ? (https://vborg.vbsupport.ru/showthread.php?t=252163)

Adam H 10-16-2010 08:56 PM

Quote:

Originally Posted by Lynne (Post 2110832)
You *cannot* use the code I gave you exactly as I wrote it. You need to change the string to be the string needed for your site. Like on my test site, I had to use "1-the-front-page" because that is what my homepage is called.

But i thought that as default mine is 1-Index ?

If i look in the VB options - content management - default page - which is 1-Index

Lynne 10-16-2010 09:45 PM

That is not where it gets $_GET['r'] (see the url when you click to go to that section). It has to do with the section name. When you edit your section, it will say what the real value is.

Adam H 10-16-2010 09:55 PM

Yes , its the same , i put everything basic like that on the test board so that i could test it was right .

So the home page is for example :

1-home

The default CMS name in the option is also 1-home

The code im using is :

Code:

<vb:if condition="$_GET['r'] == '1-home'">hello3</vb:if>
Its in the navbar template. I cant see why its not working . Ive cleared all cache and disabled content caching to see if it was a cache issue but its not .

So is that exact code working on your test board ?

Lynne 10-16-2010 11:23 PM

How about a link to see this?

And no, that isn't the exact code I use. I have a different name for my home page.

Try this instead:
HTML Code:

<vb:if condition="THIS_SCRIPT == 'vbcms' AND ($_GET['r'] == '1-home' OR !$_GET['r'])">hello3</vb:if>

Adam H 10-16-2010 11:35 PM

Quote:

Originally Posted by Lynne (Post 2110869)
How about a link to see this?

And no, that isn't the exact code I use. I have a different name for my home page.

Try this instead:
HTML Code:

<vb:if condition="THIS_SCRIPT == 'vbcms' AND ($_GET['r'] == '1-home' OR !$_GET['r'])">hello3</vb:if>

Lynne, You are truly amazing :D , Yet again I owe you a beer :)..............or wine .

Thanks alot that one worked perfectly .


All times are GMT. The time now is 05:47 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02075 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete