1st, for the using of
tpl_header.php
Originally Posted by
markov
However - using the first method of adding code to the tpl_header.php works fine. If anybody is struggling here due to lack of php skills or coffee - this is how I did it.
It can be simplified.
For your example the target file you want it to be inserted,
seat.php (or seat.htm)
Then in your override file of tpl_header.php, and in the appropriate location, insert one line and as the example below.
Code:
<?php include 'seat.php' ?>
Then the seat.htm will be inserted to the related location inside the header.
For the other functions don't wanted in the original header, just remark out them. Or your new override tpl_header.php can only contain the one line in above example.
2nd, for the using of
tpl_main_page.php
Please note that in the begin of the file, it have the variables defined
Code:
$header_template = 'seating.php';
$footer_template = 'tpl_footer.php';
$left_column_file = 'column_left.php';
$right_column_file = 'column_right.php';
However, the code followed still use the tpl_header.php, instead of the variable $header_template. Hence, your file don't has the chance.
To solve this, in your override file of tpl_main_page.php
find the line below at about line #70
PHP Code:
require($template->get_template_dir('tpl_header.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_header.php');?>
And change it to use the variable $header_template instead of the tpl_header.php
PHP Code:
require($template->get_template_dir($header_template ,DIR_WS_TEMPLATE, $current_page_base,'common'). '/' . $header_template);?>
And for the other three variables, repeat the steps above for each variable.
.
Bookmarks