VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: derek webster on December 11, 2018, 14:56:29 PM

Title: Bootstrap 4 Layout dropdown in config
Post by: derek webster on December 11, 2018, 14:56:29 PM
Hi i'm on VirtueMart 3.4.2. this is my first install of V3. I'm trying to use the Boostrap dropdown that triggers the use of the bs4 series of  sublayouts. But it doesnt make any difference when I change this. Only the none (Legacy) option seems to change the layout.

I can see the bs4 sublayouts and I've also created template overrides for them as per the documentation.

Hope someone can help

Thanks

derek
Title: Re: Bootstrap 4 Layout dropdown in config
Post by: Jörgen on December 11, 2018, 15:08:01 PM
Have You chosen the new layout in the product / category / configuration ?

What have You done so far, what files have You created ? Naming and calling is important...

Jörgen @ Kreativ Fotografi
Title: Re: Bootstrap 4 Layout dropdown in config
Post by: jenkinhill on December 11, 2018, 15:25:16 PM
AFAIK bootstrap4 option is ready for Joomla 4 and not in use yet unless you are testing the J4 alphas
Title: Re: Bootstrap 4 Layout dropdown in config
Post by: derek webster on December 12, 2018, 10:57:17 AM
Thanks guys - I'm new to this version of Joomla. I just thought that if I selected Bootstrap 4 from that dropdown then the sub layouts would switch over to the bs4- prefixed sublayouts that were already there. but that dropdown seems to do nothing.

Its ok tho I think I'll just create a standard override and manualy code the sublayouts the way I want them using bootstrap 4 markup. I'd probably have to change them anyway.

Thanks for your replies
Title: Re: Bootstrap 4 Layout dropdown in config
Post by: derek webster on December 12, 2018, 11:56:10 AM
Just to pipe back in

Undersublayouts> products.php there is a line to call the "add to cart" functionality

echo shopFunctionsF::renderVmSubLayout('addtocart',array('product'=>$product,'rowHeights'=>$rowsHeight[$row], 'position' => array('ontop', 'addtocart')));

In order to utilise the Boostrap4 version of this sublayout - I've changed it to...

echo shopFunctionsF::renderVmSubLayout('bs4-addtocart',array('product'=>$product,'rowHeights'=>$rowsHeight[$row], 'position' => array('ontop', 'addtocart')));

Now it brings in all the nice Boostrap 4 styled elements.

THIS is what I assumed would be handled by the Admin dropdown.
@jenkinhill  - You rigth that boostrap 4 isnt supported in the Admin section untill Joomla4 but this doesnt stop us using it on the front end