The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Problem solving with the new template system
Hey all,
With the new template system it's getting me confused. I want to grab a few fields from the database, assign them in a defined format on a string, and then register that string to be displayed in a sidebar. (Using SS' sidebar mod) I've got it mostly figured out, but it doesn't seem to be displaying. What do I need to do? Here's my code; PHP Code:
But when I try to use {vb:raw rp_fh_contents} in the column template nothing shows up. Any suggestions? Thanks |
#2
|
||||
|
||||
What are you doing with the template rp_fh? You never rendered it. You created it, you registered a variable to be used in it, but you never finished the process by rendering it.
|
#3
|
|||
|
|||
I want to use the variable $rp_fh_printout_string in the ss_rightcolumn_contents template. How can I do that? I guess I misunderstood the guide I read. Do I need to create a whole new template and then use it as a variable?
|
#4
|
||||
|
||||
Not necessarily. But again I'll ask, what is the purpose of the template rp_fh? Do you need it? If not, why do you have anything to do with it in there?
Also, make sure the hook location you picked gets rendered before the column template is rendered or this won't work. |
#5
|
|||
|
|||
Quote:
|
#6
|
||||
|
||||
You only need to generate a template if you are going to use the template. You don't use it in your code, so why bother to generate it? Get rid of all your template stuff except the preregistering since I see no purpose for it since you never render/use the template at all.
Your code should work if you are preregistering the variable prior to the column template being rendered. |
#7
|
|||
|
|||
Quote:
I just edited the SS plugin when it rendered the templates and added the $templater->register() function. Thank you again. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|