Hello;
it should be possible, extending your template.
Here is an example, using the default template.
- First, edit the file includes/page_header.php
At the end of this file, just before the closing:
?>
add these lines:
//---------------------------------------------------------------------------------------------
//---- Template my_menu.html ------------------------------------------------------------------
//---------------------------------------------------------------------------------------------
$my_menu = $site_template->parse_template("my_menu");
$site_template->register_vars(array(
"my_menu" => $my_menu
));
unset($my_menu);
//---------------------------------------------------------------------------------------------
//---- Template my_footer.html ----------------------------------------------------------------
//---------------------------------------------------------------------------------------------
$my_footer = $site_template->parse_template("my_footer");
$site_template->register_vars(array(
"my_footer" => $my_footer
));
unset($my_footer);
- Now, go to templates/your_template/ folder.
_____Create a first file called "
my_menu.html", with this example code:
<div align="center">
<table width="100" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" align="center" height="17" background="{template_url}/images/button.gif" ><a href="index.php" style="text-decoration: none"><strong>First link</strong></a></td>
</tr>
<tr>
<td width="100%" align="center" height="17" background="{template_url}/images/button.gif" ><a href="index.php" style="text-decoration: none"><strong>Second link</strong></a></td>
</tr>
<tr>
<td width="100%" align="center" height="17" background="{template_url}/images/button.gif" ><a href="http://www.mysite.com/" style="text-decoration: none"><strong>Partner</strong></a></td>
</tr>
</table>
</div>
<br>
You will need also to copy this image:
, into your_template/images/ directory.
_____Create another file called "
my_footer.html" with this code:
<br /><div align="center">
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr class="head1">
<td width="25%" align="center" class="row1"><a href="contact.php">Contact us</a> </td>
<td width="25%" align="center" class="row2"><a href="cookies.php">Cookies</a></td>
<td width="25%" align="center" class="row1"><a href="terms.php">Terms</a></td>
<td width="25%" align="center" class="row2"><a href="wazza.php">Etc...</a></td>
</tr>
</table>
</div>
- Now, you're able to call {my_footer} and {my_menu} in any of your other template pages.
Example: open
your_template/home.html file/
Find:
{endif random_image}
Add this:
{my_menu}
Find:
{footer}
Add
BEFORE:
{my_footer}
I've done this with the default menu, as I said, and had this:
- My_menu display:
- My_footer display:
Once done, you just have to modify the file my_menu.html or my_footer.html once to get the modification in the whole template.
I'm sure you will be able to custom it as you prefer.
Please find in attachment the modified page_header.php, version 1.7.6 and the template files and image.
Salutations.