Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Making assets like asset name="Panel" and asset name="Content"

edited October 2010 in Vanilla 2.0 - 2.8
I'm looking at my theme .tpl file and I see how vanilla is calling in certain "assets". for example:

{asset name="Panel"}

I want to make my own "assets" and be able to put it in my .tpl file. Where can I go to create these?

Any help would be appreciated!


  • Options
    MarkMark Vanilla Staff
    It is really simple, actually. Just drop them into you tpl exactly as we did for panel and content. Then you can add things to them by using controller->AddAsset() or by specifying the name of your asset I'm the assettarget method of a module.

    Make sense? Sorry if this isn't enough info, typing on my iPhone :)
  • Options
    That made a little sense, and it did help me out a lot actually with one of the things I was doing. But one thing is a little unclear, where do I actually code this in? If I make my own php and class files such as ex: categories.php & class,categoriesmodule.php, will vanilla pull them in like the others?

    Thanks for the help ^_^
  • Options
    LincLinc Detroit Admin
    You can put the code to add the asset directly in the template file. Or, you could make a simple plugin.

    Generally you want to avoid adding code to core Vanilla files or else upgrades get very tricky.
Sign In or Register to comment.