Creating includes for placement in templates?
I have some template edits that are getting quite large. For ease of editing and manageability, I would like to make them as separate pieces of code that I can call by just entering "$whatever" in a template to call them.
For example, if I have a banner that I run after the 1st post in every thread and I keep the code in the postbit_legacy template. I have a lot of IF statements to have it show up in certain forums and not show up in others, etc. I want to expand on this code which will make it quite large. So, I want to be able to call that code in the postbit_legacy template with $banner and if I want to edit the code, it will be easier than wading through the postbit_legacy template.
I want to learn how to do it as much as anything else. I know this is probably pretty easy, but I am not sure the right way to do it.
Any help or direction?
|