PDA

View Full Version : Display a Phrase


MrBeanzy
02-10-2011, 04:54 PM
I want to display a phrase for a page it wasnt intended for. I put


<h3 class="blocksubhead">$vbphrase[market_total_purchases]</h3>


But it doesnt display. Is there other code i need to use?

Thanks

ForumsMods
02-10-2011, 05:13 PM
<h3 class="blocksubhead">{vb:rawphrase market_total_purchases}</h3>
If phrase is not global, you have to change it to global, include phrase group into php file or create a new phrase.

MrBeanzy
02-10-2011, 05:57 PM
Oh, so what code do you use to include it? Is it require_once? I'm a vB noob!

Lynne
02-10-2011, 05:59 PM
As Adrian said, if the phrase is of type Global, then you shouldn't have to do anything except spit it out the way he posted.

MrBeanzy
02-10-2011, 06:03 PM
Oh sorry! I see, just for reference, what would i have to put if the phrase wasnt global?

Lynne
02-10-2011, 06:12 PM
Oh sorry! I see, just for reference, what would i have to put if the phrase wasnt global?
You would create a plugin to add that phrasegroup to the page.
if (some statement to only add to a specific page)
$GLOBALS['phrasegroups'][] = 'xxxxxxx';

MrBeanzy
02-10-2011, 07:22 PM
Awesome, all working, thanks for your help!