R
R
Ruslan2021-11-24 09:55:46
opencart
Ruslan, 2021-11-24 09:55:46

How to change contents of content_top and content_bottom in opencart?

In the common folder of the theme, there are tpl files content_top.tpl and content_bottom.tpl. They have only three lines for connecting the module

<?php foreach ($modules as $module) { ?>
<?php echo $module; ?>
<?php } ?>

I go to the controller, it pulls up the variables, depending on which route is passed. And where is the actual content of these two views (content_top.tpl and content_bottom.tpl)? How to make a change to their html content? Maybe it's in a database somewhere?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
VVCh, 2021-11-24
@VVCh

These are the standard module positions in the main thread
{{ header }}
{{column_left }}
{{ id=content }}
{{ content_top }}
{{ content_bottom }}
{{ column_right }}
{{footer}} The
content of these views is populated in the controller representation

O
opencartbot, 2021-11-24
@opencartbot

Look in the admin section Design -> Layouts (sometimes Schemes), where for each route you can add modules in positions: content_top, content_bottom, etc.
If you need to display your html code somewhere, in the Modules/Extensions section you need to enable the "Text block - HTML" module and add content there. After that, bring this module to the desired layout and position through Design -> Layouts.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question