Jump to content

Layout Builder


abmcr
 Share

Recommended Posts

PW is very flexible, but in some case a layout builder may be offer more flexibility... Not a very complex tool as the bad Visual Composer Word Press plugin.. but a similar feature

I know the Hanna code but a more friendly tool may be useful.

What our opinion?
Thank you

Link to comment
Share on other sites

On 19/8/2016 at 4:09 PM, pwired said:

It will produce spaghetti and bloated code like they all do.

This is true... but some times  a final user (a tipical client) require a simple system for create complex layout...

I think repeater matrix may be a good solutions

Thank you

Link to comment
Share on other sites

Hello abmcr,

for that I created few modules and try many options to get best result. But also here is example with PW default:

1. create independent page tree structure (eg. "Widgets/Addons" or...)

2. In that structure categorise widgets/addons as child of "blank" template

 

Widgets (template: addons)

|- Sliders (template: blank)

    -- Some slider (template: slider-1)

    -- Some another slider (template: slider-2)

|- Call To Actions (template: blank)

    -- Some Call To Action widget (template: call-to-action-1)

|- Banners (template: blank)

    -- Some banner (template: banner)

|- Text and Image (template: blank)

    -- Some Text and Image block (template: text-image-1)

    -- Some another Text and Image block (template: text-image-2)

Etc...

NOTE: Use nice Bernhard module TemplatePreviewImages, or here is link to version where I added few additions.

3.1. Go to your main pages (Home, Category etc...) and add field type page with name "widgets" or "addons", parent page for that field set as page "Widgets" (from 1). With this option you can add rows of widgets to your main pages.

OR

3.2. If you want to use positions (top, left, right, bottom etc...) than on your main pages (Home, Category etc...) add field type repeater "Blocks" with fields : "position" (select),  "widgets" (page field, 3.1),  "show" (select, with options: only-this, only-childs, default (this and childs)).

Also all this examples need some logic, and at the end, in your templates you can call widgets like in this example:

<?php if(isset($pos['left'])): ?>
    <div class="col-md-3 columns">
        <?php renderWidgets($pos['left']); ?>
    </div>
<?php endif; ?>

Regards.

Link to comment
Share on other sites

check out the topics and the pic of this post if you wanna go further the dark side of content blocks....;)

with PW it is easy to build a blockbuilder that really don't mess your page since on my websites i have full control to the contentblocks that a editor can use...

regards mr-fan

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...