Post by justinesmithies » Thu Apr 11, 2013 3:50 pm

I have the same code in the start of all my controller / language / tpl files and i was wondering is there a way to save size to use an include so its all in 3 files to be included controller / lang / tpl in the files above , Thus saving on file size ???

I hope someone knows what i mean ?

any help would be appreciated.

User avatar

Posts

Joined
Sun Dec 23, 2012 5:31 am

Post by Johnathan » Thu Apr 11, 2013 10:00 pm

Yes, you can just use a PHP statement in the template file to include another .tpl file. For example:

Code: Select all

<?php include('catalog/view/theme/default/template/product/layout.tpl'); ?>
Then you'd use that in place of the product code. Keep in mind that different controllers use different variables, however, and if you use vQmods then they won't affect the included file (without some adjustment).

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am

Who is online

Users browsing this forum: No registered users and 45 guests