![]() |
custom template in an existing template
Hello all.
I'm fairly new to vb4. I have updated one of my own mods following guides on here, but I've got a couple of other changes I want to make and I am a little stumped, so some help would be appreciated. Here goes: In vb3 I added a new template named custom_postbit_badges which contained this code: Code:
<br> I then edited postbit_legacy and added this line of code in the appropriate place: Code:
<!-- START Badges by Profile Field Code --> Code:
Product: bulletin I think you can probably guess where this is going :D So, how (can?) I replicate this behaviour in vb4? Thanks in advance. |
See this article about vb4 template conditions/syntax - https://vborg.vbsupport.ru/showthread.php?t=231525
and this thread about rendering templates and registering variables for use in them - https://vborg.vbsupport.ru/showthread.php?t=228078 |
Hello Lynne,
Thanks for the reply. Stupid question. Would I put the html like code into a plugin and reference it there, rather than a custom template file, or can I put the following sort of code into the custom template: Code:
$templater = vB_Template::create('mytemplate'); I think that is the main thing that confuses me as I'm unsure if that code can go in an template, or has to go in a plugin |
You will need something like what you wrote in order to use the variable $custom_postbit_badges in your template.
|
Quote:
That code goes in a plugin. You can probably use hook location parse_templates. |
All times are GMT. The time now is 01:22 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|