Last active
December 15, 2015 01:49
-
-
Save foxp2/5183148 to your computer and use it in GitHub Desktop.
Integration of Twig Template Engine in osCommerce 2.4
Multiple inheritance between templates !
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {# file: includes/modules/templates/twig/content/base.html.twig #} | |
| <!DOCTYPE html> | |
| <html {{ constant('HTML_PARAMS') | raw}}> | |
| <head> | |
| {% block head %} | |
| <meta charset="{{ constant('CHARSET') }}" /> | |
| <title>{{ title }}</title> | |
| <base href="{{ base_href }}" /> | |
| <link rel="icon" type="image/png" href="public/images/oscommerce_icon.png" /> | |
| <meta name="generator" content="osCommerce Online Merchant" /> | |
| {% endblock %} | |
| {% block head_javascript %} | |
| <script src="ext/jquery/jquery-1.9.1.min.js"></script> | |
| <script src="ext/bootstrap/js/bootstrap.min.js"></script> | |
| {% endblock %} | |
| {% block stylesheet %} | |
| <link rel="stylesheet" href="public/template/gosling/css/general.css" /> | |
| {% endblock %} | |
| {% block header_tags %} | |
| {{ header_tags | raw}} | |
| {% endblock %} | |
| </head> | |
| <body> | |
| <div id="bodyWrapper" class="container-fluid"> | |
| {% if header_message_exists %} | |
| {% block headermessage %} | |
| <div class="row-fluid">{{ header_message }}</div> | |
| {% endblock %} | |
| {% endif %} | |
| {% block header %} | |
| <div id="header" class="row-fluid"> | |
| <div id="storeLogo"><a href="{{ link() | raw }}"><img src="{{ constant('DIR_WS_IMAGES') }}store_logo.png" alt="{{ constant('STORE_NAME') }}" /></a></div> | |
| <div id="headerShortcuts" class="btn-group"> | |
| {{ button( cart_contents, 'shopping-cart', link('cart') , 'class_shopping_cart') | raw }} | |
| {{ button( constant('HEADER_TITLE_CHECKOUT'), 'play', link('checkout', null, 'SSL'), 'class_checkout') | raw }} | |
| {{ button( constant('HEADER_TITLE_MY_ACCOUNT'), 'user', link('account', null, 'SSL'), 'class_account' ) | raw }} | |
| {% if isLoggedOn %} | |
| {{ button( constant('HEADER_TITLE_LOGOFF'), null, link('account', 'logoff', 'SSL') ) | raw}} | |
| {% endif %} | |
| </div> | |
| </div> | |
| {% endblock %} | |
| {% block breadcrumb %} | |
| <div class="row-fluid"> | |
| {{ breadcrumb | raw}} | |
| </div> | |
| {% endblock %} | |
| {% if if_error_message %} | |
| {% block error_message %} | |
| <table border="0" width="100%" cellspacing="0" cellpadding="2"> | |
| <tr class="headerError"> | |
| <td class="headerError">{{ error_message | raw }}</td> | |
| </tr> | |
| </table> | |
| {% endblock %} | |
| {% endif %} | |
| {% if if_info_message %} | |
| {% block info_message %} | |
| <table border="0" width="100%" cellspacing="0" cellpadding="2"> | |
| <tr class="headerInfo"> | |
| <td class="headerInfo">{{ info_message | raw }}</td> | |
| </tr> | |
| </table> | |
| {% endblock %} | |
| {% endif %} | |
| <div class="row-fluid"> | |
| {% if if_column_left %} | |
| {% block columnleft %} | |
| <div id="columnLeft" class="span{{ GridColumnWidth }}"> | |
| <ul class="nav nav-list"> | |
| {{ column_left | raw }} | |
| </ul> | |
| </div> | |
| {% endblock %} | |
| {% endif %} | |
| {% block appcontent %} | |
| {% endblock %} | |
| {% if if_column_right %} | |
| {% block columnright %} | |
| <div id="columnRight" class="span{{ GridColumnWidth }}"> | |
| <ul class="nav nav-list"> | |
| {{ column_right | raw }} | |
| </ul> | |
| </div> | |
| {% endblock %} | |
| {% endif %} | |
| {% block footer %} | |
| <div class="footer span12"> | |
| <p align="center">{{ constant('FOOTER_TEXT_BODY') | raw}}</p> | |
| </div> | |
| {% endblock %} | |
| </div><!-- //end row fluid --> | |
| </div><!-- // end bodywrapper --> | |
| {% block footerscript %} | |
| {{ footer_script | raw}} | |
| {% endblock %} | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {# file: includes/modules/templates/twig/content/app_zero_column.html.twig #} | |
| {% extends "base.html.twig" %} | |
| {% block columnleft %} | |
| {% endblock %} | |
| {% block appcontent %} | |
| {% endblock %} | |
| {% block columnright %} | |
| {% endblock %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {# file: includes/apps/info/content/contact.html.twig #} | |
| {% extends constant('ZERO_COLUMN_CONTACT') ? "app_zero_column.html.twig" : "base.html.twig" %} | |
| {% block appcontent %} | |
| <div id="bodyContent" class="span{{ constant('ZERO_COLUMN_CONTACT') ? 12 : GridContentWidth}}"> | |
| {{ form('contact_us', link('info', 'contact&process'), 'post', 'class="span12 well"', true) | raw }} | |
| <h1>{{ constant('HEADING_TITLE_CONTACT') }}</h1> | |
| {{ messagestack('contact') | raw }} | |
| <div class="clearfix"></div> | |
| <div class="row span12"> | |
| <div class="span4"> | |
| <label>{{ constant('ENTRY_CONTACT_INPUT_FIRSTNAME') }}</label> | |
| <div class="input-prepend"> | |
| <span class="add-on"><i class="icon-user"></i></span> | |
| {{ inputfield('firstname','','class="input-xlarge"', constant('ENTRY_CONTACT_PLACEHOLDER_FIRSTNAME')) | raw }} | |
| </div> | |
| <label>{{ constant('ENTRY_CONTACT_INPUT_LASTNAME') }}</label> | |
| <div class="input-prepend"> | |
| <span class="add-on"><i class="icon-user"></i></span> | |
| {{ inputfield('lastname','','class="input-xlarge"', constant('ENTRY_CONTACT_PLACEHOLDER_LASTNAME')) | raw }} | |
| </div> | |
| <label>{{ constant('ENTRY_CONTACT_INPUT_EMAIL') }}</label> | |
| <div class="input-prepend"> | |
| <span class="add-on"><i class="icon-envelope"></i></span> | |
| {{ inputfield('email','','class="input-xlarge"', constant('ENTRY_CONTACT_PLACEHOLDER_EMAIL')) | raw }} | |
| </div> | |
| </div> | |
| <div class="span8"> | |
| <label>{{ constant('ENTRY_ENQUIRY') }}</label> | |
| {{ textareafield('enquiry', 'soft', 50, 15,null, 'class="input-xlarge span10"') | raw }} | |
| </div> | |
| </div> | |
| <button type="submit" class="btn btn-primary pull-right"><i class="icon-ok-sign icon-white"></i> {{ constant('IMAGE_BUTTON_CONTINUE') }}</button> | |
| </form> | |
| </div> | |
| {% endblock %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment