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 09:52 AM

CMS conditional ?
 
Hi, Im trying to only display a peace of code at the bottom of the navbar template on the cms , but i want it to only display on the CMS homepage , not the internal cms pages.

Ive tried THIS SCRIPT conditional but that shows across the entire CMS and not the individual page.

Ive also tried the page title conditional but that doesnt seem to work either .

Any ideas ?

Lynne 10-16-2010 01:37 PM

If I recall, you can use the variable $_GET['r'] to write that sort of conditional.

Adam H 10-16-2010 01:46 PM

Ok , How would that be written as an example ?

Lynne 10-16-2010 02:01 PM

HTML Code:

<vb:if condition="$_GET['r'] == '1-Index'">hello3</vb:if>

Adam H 10-16-2010 02:15 PM

Quote:

Originally Posted by Lynne (Post 2110736)
HTML Code:

<vb:if condition="$_GET['r'] == '1-Index'">hello3</vb:if>

:( , i was sooooo hoping that was going to work , Unfortunatly it didnt . Any other idea's ?

I double checked that my cms was still set on 1-index and it is so i cant see why it wouldnt work

Lynne 10-16-2010 05:06 PM

Well, if yours is set to 1-index, then you need to use that instead of 1-Index. It's a string - you need to be exact.

And if you continue to have problems, you need to post *exactly* waht you have done - what template, exactly where in the template, and a link to your page, etc.

Adam H 10-16-2010 06:19 PM

Sorry i meant it was exactly like the one you had put in, ive just tried it on a fresh vbulletin install too and it doesnt work on that either ?

Lynne 10-16-2010 08:39 PM

And I just got done telling you you can't use exactly what I wrote and why. I also gave you advice and what to tell us if you want more help.

That code works just fine on my 4.0.7 site although my home page is not called "index" thus I changed that part.

Adam H 10-16-2010 08:43 PM

Quote:

Originally Posted by Lynne (Post 2110822)
And I just got done telling you you can't use exactly what I wrote and why. I also gave you advice and what to tell us if you want more help.

Sorry didnt see that , Ive installed a new version of vbulletin on a test domain quickly to see if it works on a fresh install , Ive then just tried the code you gave me in the Navbar template just above this line :
PHP Code:

<vb:if condition="$show['notices'] AND THIS_SCRIPT != 'register'"

.

Lynne 10-16-2010 08:49 PM

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.


All times are GMT. The time now is 01:29 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
  • Page Generation 0.03243 seconds
  • Memory Usage 1,736KB
  • 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
  • (2)bbcode_html_printable
  • (1)bbcode_php_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
  • (10)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