Results 1 to 6 of 6

Thread: blocks extension - does it work at all?

  1. #1
    User
    Join Date
    09-08-09.
    Location
    Snellville, GA
    Posts
    194

    Default blocks extension - does it work at all?

    I've been experimenting with the "blocks" extension as an alternative to multiple page layouts. I've tried several iterations of assigning elements to blocks, and incorporating it into the page layout etc., but no matter what I do, content never appears on the page in Contao 2.11.3 using this extension.

    Anybody have any progress getting this extension to work? If so how did you do it? I'm doing better with the Content Boxes which actually do work. I'm not sure if its me, the extension, or the limited usage instructions posted with the extension, but I would appreciate any suggestions.

    Ernest McDermon
    Snellville, GA

  2. #2
    User
    Join Date
    09-08-09.
    Location
    Snellville, GA
    Posts
    194

    Default Re: blocks extension - REVIEW

    Okay, I finally got the blocks extension working today after fumbling with it for about an hour in its current version.

    Basically you create in the themes/blocks a new "block" with a name like "blockLeftColumn". Save and close.

    Once that is created, in the list of blocks, the new block appears and there is a "gear icon" to the right that you use to add front-end modules to the block area. All well and good.

    You still have edit the template for the page to add the Content Block to the page layout to activate it. Then you have to go back to the block, edit it, and then check which page or pages that the block is to appear in.

    I've been using "Content Boxes" previously with good results, and I think the real difference in the two is that with Content Boxes you can also pick and choose Articles to add into the mix. Contao works with page layouts in four flavors, and that is one of the structural underpinnings for the layout of pages. I'm not certain that the "blocks" extension adds anything to this mix, except possibly you can use tags to display the blocks.

    I think we'll still keep using Content Boxes until I can better determine how to benefit from this extension. If I come up with anything here I'll post another comment. Anybody using this extension that has ideas on how to use it, I'd be glad to hear about it.

    Ernest McDermon, Snellville GA

  3. #3
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: blocks extension - does it work at all?

    I normally use articles to create columns or grids. You can then split them any way you like and every page can be unique without having to create another layout.

    Article Main (g8 class, main column)
    Arcivle Sidebar (g4 class, sidebar column)

    Then inside Article Main you can do another division using ce_wrap and ce_break to create even more columns inside g8.
    ce_wrap start g4
    Content for first column (in main g8)
    ce_wrap end
    ce_wrap start g4
    Content for second column (in main g8)
    ce_wrap end

    Then it also becomes useful to have ml0 and mr0 styles to zero out left and right margins.

    I also use the "includes" extension which allows you to include an article (or CE) as a module in a layout. Then you can forget about touching your layout again. You can then focus on editing the Article or providing permissions to a client to edit the article (content).

    I normally create a hidden page called Site Layout and in that I create a Header Article and a Footer Article. These are "includes" into the page layout and then I can edit both Articles add header graphics, menu, etc using CEs, which is easier than building modules for each part.

  4. #4
    User
    Join Date
    09-08-09.
    Location
    Snellville, GA
    Posts
    194

    Default Re: blocks extension - does it work at all?

    Thyon:

    Thank you for posting a response, these are excellent ideas and suggestions!

    I'm already using the 960 grid system to split up different areas of the page as you are doing. I use the ce_wrap and ce_break for their visual cues for my clients to be able to see different sections in the article area, and for consistency in our build-outs.

    Couple of things we're doing here:

    1. More modular use of articles using the ce_wrap and ce_break. We use the structure below to turn off/on custom sections as needed on a page with a mouse click and the content moves up without breaking the layout and still validates.

    HEADER
    Code:
    ce_wrap headerBkgr
        ce_wrap container_12
             ce_wrap g5
                 content
             ce_wrap end
             ce_wrap g7
                 content
             ce_wrap end
        ce_wrap end
    ce_wrap end
    ce_break
    CUSTOM SECTION (SLIDE SHOW)
    Code:
    ce_wrap id feature
        ce_wrap container_12
             ce_wrap g5
                 content
             ce_wrap end
             ce_wrap g7
                 content
             ce_wrap end
        ce_wrap end
    ce_wrap end
    ce_break
    MAIN CONTENT AREA
    Code:
        ce_wrap container_12
             ce_wrap g3
                 content
             ce_wrap end
             ce_wrap g9
                 content
             ce_wrap end
        ce_wrap end
    ce_break
    FOOTER
    Code:
    ce_wrap navBkgrBeach
        ce_wrap container_12
             ce_wrap g8
                 content
             ce_wrap end
             ce_wrap g4
                 content
             ce_wrap end
        ce_wrap end
    ce_wrap end
    2. Like you, I like the idea of using the grids to break up the main content area into columns, but depending on the client and the layout of the graphics, we find the occasional use of the fixed left / right / both columns useful. The problem has always been how to get the container_12 into the mix with variable layouts. My solution is to modify the xhtml/html5 template to add it in as a hard call:

    Code:
    <div id="container">
    <div class="container_12">  
    
    </div> 
    </div>
    For most of our websites I'm not a fan of variable width websites but this lets us use the same template for either no columns main content area or one that uses the contao layout setup.

    3. Your suggestion about the includes and the hidden page layout are appreciated. I've been using the Home Page articles as the "driver" for the header and footer content, and then using content boxes to attach these to the pages. Your idea about the includes may be a better option and I will definitely look at that.

    Also the css suggestion to turn "off" the margin calls for the grid system as needed I think will be useful going forward.

    4. BTW, I really like your thyon_basic extension, it is a real time saver for us. I like to deploy websites with a basic load of extensions as "Value Added" for our clients, and your thyon_basic is always the first one we start with.

    Again thanks for the excellent suggestions. I learn something new about Contao every day, and you've got me thinking here about some improvements we can add in.

    Ernest McDermon
    Snellville, GA

  5. #5
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: blocks extension - does it work at all?

    I'm also busy updating the ce_wrap, ce_break and includes for Contao 3.0 for my new site. It's not that hard to update the code as I thought it would be. The problem lies in all the nice extensions that are not yet 3.x compatible, like the valumsUploader, Sliders, etc.

    That's why I made that thyon_basic, what a win!

  6. #6
    User
    Join Date
    09-08-09.
    Location
    Snellville, GA
    Posts
    194

    Default Re: blocks extension - does it work at all?

    Keep up the good work! IMHO thyon_basic is a "must have" extension for every Contao website!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •