Форумы / Cotonti / Support / Custom header for plugin?

tensh
#1 18.01.2013 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 18.01.2013 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 18.01.2013 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 21.01.2013 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 21.01.2013 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 22.01.2013 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?

Отредактировано: tensh (22.01.2013 11:09, 12 лет назад)