Quote:
Originally Posted by MyLibary
Do i have limit of how much plugins like that i can create?
Or in other words will it slow my website if i will create up to 20 custom plugins like this?
|
I don't think it matters how many plugins you have since all the code for a given hook location gets built in to one string and loaded from the datastore in one call. But unless you have a reason to want to keep them separate, there's no reason you couldn't do it all in one plugin.
You can also use one preRegister call (assuming they're all going to the header template), like:
Code:
$template = vB_Template::create('template1');
$templatevalues['template1'] = $template->render();
$template = vB_Template::create('template2');
$templatevalues['template2'] = $template->render();
$template = vB_Template::create('template3');
$templatevalues['template3'] = $template->render();
vB_Template::preRegister('header', $templatevalues);
But if you'd rather make them separate, I don't think there's a lot of overhead involved in multiple plugins or preRegister calls.