Forums / Cotonti / Support / Custom header for plugin?

tensh
#1 2013-01-18 14:15

Hi;

Is it possible to make the plugin load custom header/footer tpl? 

I want to create a landing page for Adwords campaign (with a small submit form), it would be a squeeze page with custom header and footer.

thanks in advance.

lukgoh
#2 2013-01-18 16:01

I'm not sure about the plugins but if you were to write a module instead I am pretty sure you could just leave out the require header.php and footer.php although because of the information parsed in the header I'm not sure what kind of impact it would have on how the site runs. 

Luke.

Trustmaster
#3 2013-01-18 17:18

It requires $cfg['enablecustomhf'] set TRUE in config.php and header.plugin_name.tpl/footer.plugin_name.tpl in theme's root.

May the Source be with you!
tensh
#4 2013-01-21 11:10

Thank you for response, Lukgoh and Trustmaster!

Trustmaster - is it the only way? Custom headers have a great impact on site's performance as far as I noticed.

Trustmaster
#5 2013-01-21 12:28

They shouldn't. All they affect is the way template paths for header and footer are calculated. I don't think checking for a few files could affect the performance that much.

May the Source be with you!
tensh
#6 2013-01-22 10:25

Hmm, or maybe I remember performance issues from Genoa...?
I had a site which had custom header every single list category and it loaded 2x-3x slower than normally.

Allright then, I will check custom headers. Thanks!

Added 12 minutes later:

Hmm, strange.

I added a custom header for a list category some-company-name:

header.some-company-name.tpl

... yet I can't see any changes. I use Siena 9.11

Is it only for lists and not for a certain category?

P.S. 2 - I decided to use lists since when I made a plugin name with dashes in the folder/filenames (plugin some-company-name), Cotonti didn't recognize it (I couldn't navigate to the plugin)

Added 25 minutes later:

I made IF statement in header.list.tpl and it works so far. But what about plugin names?

This post was edited by tensh (2013-01-22 11:09, 11 years ago)