Post by todavy » Sat Jul 31, 2021 9:04 pm

OpenCart 3.0.3.7 .
Is it possible to have diffrent combinations of Column Left / Content Top / Column Right on diffrent rows? For example I'd like to have Slider / Carosel on Content Top and a banner at the right side of the slider at Column Right. Then below I'd like to have the featured products stretching full width (all between Column Left to Column Right).

New member

Posts

Joined
Tue Jun 10, 2014 5:00 pm

Post by rjcalifornia » Sat Jul 31, 2021 9:36 pm

todavy wrote:
Sat Jul 31, 2021 9:04 pm
OpenCart 3.0.3.7 .
Is it possible to have diffrent combinations of Column Left / Content Top / Column Right on diffrent rows? For example I'd like to have Slider / Carosel on Content Top and a banner at the right side of the slider at Column Right. Then below I'd like to have the featured products stretching full width (all between Column Left to Column Right).
Yes it is possible by changing the layout in the admin dashboard

Image
A2 Hosting features: Shared Turbo Boost, Managed Warp 1, Unmanaged Hyper 1, and Warp 2 Turbo


Active Member

Posts

Joined
Fri Sep 02, 2011 1:19 pm
Location - Worldwide

Post by todavy » Sat Jul 31, 2021 10:38 pm

rjcalifornia wrote:
Sat Jul 31, 2021 9:36 pm
Yes it is possible by changing the layout in the admin dashboard
How? When I add something in the "Column Right/Left" the new column goes all the way to the bottom. Or do you mean I should change the twig files?

New member

Posts

Joined
Tue Jun 10, 2014 5:00 pm

Post by JNeuhoff » Sat Jul 31, 2021 10:55 pm

It's not possible in a standard OpenCart. You'd have to modify the product.twig, which is the easy bit, but also the layout editor in the admin backend to cater for multiple rows, but this can be quite tricky.

However, for your particular example, you might get away with some style changes to always have the content bottom stretched over all three columns.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by todavy » Sun Aug 01, 2021 3:09 am

Thanks! Yes it seems to work by simply moving the {{ content_bottom }} to a new <div> tag at the end in the common / home.twig. Maybe I have to copy the {% set class = 'col-sm-12' %} also to the new <div> tag to get the resposive bootstrap stuff to work. I did everything in the Theme Editor, if thats what you mean with "Layout Editor".

{{ header }}
<div id="common-home" class="container">
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}</div>
{{ column_right }}</div>
<div class="row">{{ content_bottom }}
</div>

</div>
{{ footer }}

New member

Posts

Joined
Tue Jun 10, 2014 5:00 pm
Who is online

Users browsing this forum: No registered users and 103 guests