Why can't I edit .tpl pages like normal?

ThemeBurn SupportForumsOpenCart ThemesPavilion OpenCart ThemeWhy can't I edit .tpl pages like normal?

This topic has been marked as not resolved.

Why can I remove certain elements from tpl pages but cannot add elements of my own? How does this work and how do I edit?

For example, I am currently trying to edit /catalog/view/theme/pavilion/template/product/maufacturer_info.tpl to include some extra database fields. I can easily remove elements from the page but if I add new elements it does not show up. Even if I just stick “test” below a div tag it doesn’t show up in the html source.

I’m having the same problem with other parts of the site as well.

How do I edit these pages?

July 8, 2015 at 11:50 am #41970

Hi,

Pavilion uses a specific way to build pages:

1) Theme cuts all the content from each template as blocks.

2) User defines a layout grid with the aid of Page Builder tool and inserts the content blocks inside (+ any other custom blocks if he wants)

3) System renders the new layout with the parts of the template content. That is why there is no structure markup in templates.

If you take a closer look at each template’s code, you will notice that each block is wrapped with some special code. e.g. for catalog/view/theme/pavilion/template/product/maufacturer_info.tpl, product listing is wrapped in:

<?php $tbData->slotStart('product/manufacturer/info.products', array('filter' => array('product/manufacturer/info.products.filter|oc_system_products_filter', 'products' => &$products), 'data' => $data)); ?>
........
<?php $tbData->slotStop(); ?>

If you want to insert something custom in the page, you need to modify the existing block code. Everything outside <?php $tbData->slotStart() ?>...<?php $tbData->slotStop(); ?> will be ignored.

BR,
ThemeBurn team

July 14, 2015 at 11:06 am #42134
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.