Jump to content

[RESOLU]Modification du {HOOK_FOOTER}


steph57535

Recommended Posts

Si vous avez besoin de changer la position d'affichage du footer,

alors, ouvrez le fichier "themes / [you_theme] / footer.tpl"

et déplacer {$ HOOK_FOOTER} n'importe où.

 

Et si vous voulez changer le contenu qui est affiché dans le footer,

alors vous avez besoin d'écrire un module qui va utiliser le hook du footer

 

Voici la structure du module:

 

 

custom_footer.zip/custom_footer/custom_footer.php:

<?php

if (!defined('_PS_VERSION_')) {
exit;
}

class custom_footer extends Module
{
public function __construct()
{
	$this->name = "custom_footer";
	$this->tab = "front_office_features";
	$this->version = "1.0.0";
	$this->author = "author";
	parent::__construct();
	$this->displayName = $this->l("Custom footer");
	$this->description = $this->l("Custom footer");
}

public function install()
{
	return (parent::install() and $this->registerHook('footer'));
}

public function uninstall()
{
	return (parent::uninstall() and $this->unregisterHook('footer'));
}

public function hookFooter($params)
{
       $content = 'CONTENT';
       $this->smarty->assign('footer', $content);
       return $this->display(__file__, 'tpl/content.tpl');
}
}
?>

 

custom_footer.zip/custom_footer/content.tpl:

{$footer}

Edited by Dzianis Yurevich (see edit history)
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...