Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 29 Nov 2016, 05:04
ctrenks ctrenks is offline
 
Join Date: Aug 2007
Brain freeze on vB_Template::preRegister

I have a custom template cportal, this is simple a head and footer template, and i use a php script to fill in between the lines fro outside forum pages. In the php file i have a meta section that i add meta data such as OG: and twiter card info.

I then have it al saved as $mymeta, then i run this

vB_Template:reRegister('headinclude', array('mymeta' => $mymeta));

inside the top of the headinclude template i have

{vb:raw mymeta}

this is not displaying any of the data though?

I have spent a couple of hours looking at this, somthing I thought I had working all along but not so.
Reply With Quote
  #2  
Old 29 Nov 2016, 14:16
Dragonsys's Avatar
Dragonsys Dragonsys is offline
 
Join Date: Jan 2008
Real name: Eric
if you are trying to inject the data into your cportal template, then you need to add the vb:raw to that template, and change your Register to cportal instead of headinclude.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

You also need to make sure you call out the templates in your PHP file.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Last edited by Dragonsys; 29 Nov 2016 at 14:21.
Reply With Quote
  #3  
Old 29 Nov 2016, 15:32
ctrenks ctrenks is offline
 
Join Date: Aug 2007
Thank you for the reply, it was after all working but somehow my variable was being over written, something new to track down!
Reply With Quote
Reply



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

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


New To Site? Need Help?

All times are GMT. The time now is 23:46.

Layout Options | Width: Wide Color: