From 087a11ac27f05b4e0c53621830c295218dee4b8b Mon Sep 17 00:00:00 2001 From: Mark Hesketh Date: Thu, 20 Sep 2012 17:43:24 +0100 Subject: [PATCH] Restructure template - Include header/footer templates into layout.tpl Closes #9 --- footer.tpl | 26 ------------ header.tpl | 94 ------------------------------------------- layout.tpl | 116 ++++++++++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 107 insertions(+), 129 deletions(-) delete mode 100644 footer.tpl delete mode 100644 header.tpl diff --git a/footer.tpl b/footer.tpl deleted file mode 100644 index 8b40f1c..0000000 --- a/footer.tpl +++ /dev/null @@ -1,26 +0,0 @@ -{* - * =|= Footer =================================================== - * - * Right sidebar and bottom content of theme. - * Included on every page. - * ============================================================== - *} - -{if !$content_only} - {* End of center content *} - - - {* Right sidebar *} - - - {* Footer *} - -{/if} - - \ No newline at end of file diff --git a/header.tpl b/header.tpl deleted file mode 100644 index a74bf41..0000000 --- a/header.tpl +++ /dev/null @@ -1,94 +0,0 @@ -{* -* =|= Header =================================================== -* -* , top content and left sidebar. -* Included on every page. -* ============================================================== -*} - - -{* Stop conditional comments blocking downloads. (http://bit.ly/LXcukK) *} - - - - - - - - {* Title set in Back Office > Preferences > SEO & URLs. *} - {$meta_title|escape:'htmlall':'UTF-8'} - - {* Meta description for SERPs. *} - {if isset($meta_description) AND $meta_description} - - {/if} - - {* Prestashop supports meta keywords, so little harm in including them here. (http://bit.ly/P4FuYL) *} - {if isset($meta_keywords) AND $meta_keywords} - - {/if} - - {* Robots settings set in Back office. Don't forget to generate a robots.txt too. *} - - - {* Favicon displayed in address bar, tabs and bookmarks. (http://bit.ly/P4F7xg) *} - - - {* Include all CSS files from page controller's SetMedia() *} - {if isset($css_files)} - {foreach from=$css_files key=css_uri item=media} - - {/foreach} - {/if} - - {* Required Prestashop JavaScript configuration. *} - - - {* Include all JavaScript files from page controller's SetMedia(). *} - {if isset($js_files)} - {foreach from=$js_files item=js_uri} - - {/foreach} - {/if} - - {* HTML5Shiv enables HTML5 elements in older versions of Internet Explorer. (http://bit.ly/LX9S6f) *} - - - {* Header modules hook *} - {$HOOK_HEADER} - - - - {if !$content_only} - {if isset($restricted_country_mode) && $restricted_country_mode} -
-

{l s='You cannot place a new order from your country.'} {$geolocation_country}

-
- {/if} - - {* Header *} -
- -
- {$HOOK_TOP} -
-
- - {* Left sidebar *} - - - {* Center content *} -
- {/if} diff --git a/layout.tpl b/layout.tpl index 55e665f..f50467f 100644 --- a/layout.tpl +++ b/layout.tpl @@ -2,18 +2,116 @@ * =|= Layout =================================================== * * Master layout and structure of theme. + * Includes theme's and , sidebars and footer. * ============================================================== *} -{if !empty($display_header)} - {include file='./header.tpl' HOOK_HEADER=$HOOK_HEADER} -{/if} -{if !empty($template)} - {$template} -{/if} -{if !empty($display_footer)} - {include file='./footer.tpl'} -{/if} + +{* Stop conditional comments blocking downloads. (http://bit.ly/LXcukK) *} + + + + + + + + {* Title set in Back Office > Preferences > SEO & URLs. *} + {$meta_title|escape:'htmlall':'UTF-8'} + + {* Meta description for SERPs. *} + {if isset($meta_description) AND $meta_description} + + {/if} + + {* Prestashop supports meta keywords, so little harm in including them here. (http://bit.ly/P4FuYL) *} + {if isset($meta_keywords) AND $meta_keywords} + + {/if} + + {* Robots settings set in Back office. Don't forget to generate a robots.txt too. *} + + + {* Favicon displayed in address bar, tabs and bookmarks. (http://bit.ly/P4F7xg) *} + + + {* Include all CSS files from page controller's SetMedia() *} + {if isset($css_files)} + {foreach from=$css_files key=css_uri item=media} + + {/foreach} + {/if} + + {* Required Prestashop JavaScript configuration. *} + + + {* Include all JavaScript files from page controller's SetMedia(). *} + {if isset($js_files)} + {foreach from=$js_files item=js_uri} + + {/foreach} + {/if} + + {* HTML5Shiv enables HTML5 elements in older versions of Internet Explorer. (http://bit.ly/LX9S6f) *} + + + {* Header modules hook *} + {$HOOK_HEADER} + + + + + {* Message shown if country is restricted from viewing the store. *} + {if isset($restricted_country_mode) && $restricted_country_mode} +
+

{l s='You cannot place a new order from your country.'} {$geolocation_country}

+
+ {/if} + + {* Header *} +
+ +
+ {$HOOK_TOP} +
+
+ + {* Left sidebar *} + + + {* Center content - Uses other template files. *} +
+ {if !empty($template)} + {$template} + {/if} +
+ + {* Right sidebar *} + + + {* Footer *} + + + + +{* Includes overlay features when using Live Edit from the Back Office *} {if !empty($live_edit)} {$live_edit} {/if} \ No newline at end of file