vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > vBa CMPS v4.0 Support > "How Do I..." Questions

Reply
 
Thread Tools Display Modes
  #1  
Old 03-06-2012, 10:03 AM
jca2112's Avatar
jca2112 jca2112 is offline
Junior Member
 
Join Date: May 2008
Posts: 12
Question Page title variable used in vBadvanced?

We need to have a page's page title variable available to use in a vBadvanced module. We have a module that searches using the vBulletin page title as it's search term.

Under vBa 3.0, we used the $pagetitle variable with no problem. That no longer works in vBa 4.0. I read in a previous thread that 4.0 cannot pull in a {vb:raw pagetitle} (or {vb:raw pages.title}, etc.) as a variable. Adding pagetitle or pages.title to the vBa Globalize field does not seem to have any effect.

How do I globalize the {vb:raw pagetitle} vBulletin page title variable and use it in a vBadvanced module? If that is not possible, how do I get a page's title for use in a module?

Appreciate any help/info.
Reply With Quote
  #2  
Old 03-10-2012, 11:55 AM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default

You would first need to add a new plugin to the 'global_start' hook location with this PHP code:
PHP Code:
vB_Template::preRegister('your_template_name_here', array('pages' => $pages)); 
(replace your_template_name_here with the name of the template you need to add the variable to)

Then you could use the variable {vb:raw pages.title} in your template.
__________________
Frequently Asked Questions
CMPS Users Manual

For vBadvanced software assistance, please use the support forums.
Unsolicted PMs, IMs, and email will not be responded to.
If you have a non-software related question or problem with your account, please submit a support ticket.
Reply With Quote
  #3  
Old 03-10-2012, 09:27 PM
jca2112's Avatar
jca2112 jca2112 is offline
Junior Member
 
Join Date: May 2008
Posts: 12
Thumbs up Thanks

Thanks for the help -- will try this out.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Page title variable? ctrenks "How Do I..." Questions 3 08-26-2010 04:20 PM
Is there a variable for module title? Arkidas "How Do I..." Questions 1 02-22-2010 10:29 AM
[HOW TO] Use Variable in Title Row Colspan field veenuisthebest "How Do I..." Questions 4 09-11-2008 01:56 AM
How do I change the title of my vbadvanced home page wacnstac "How Do I..." Questions 1 03-15-2007 10:35 AM
title is not correct on vbadvanced cmps page JustinBr "How Do I..." Questions 3 11-04-2006 03:54 PM


All times are GMT -4. The time now is 09:26 PM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.