Layout: module, 3 blocks, Module?

Hi,
For my front page I want to make a layout that looks more or less like the included picture

http://micware.nl/images/Zikula_home1.gif

Welcome texts, 3 blocks and the news module , all in the center in that order

I have read this post
http://community.zik…locks%20in%20centerand many others, including Wiki about theme making but it?s not working for me

the above tutorial is written for Postnuke 0.762 and Xanthia 1 I think

I use Zikula 1.0.2, development site http://www.micware.nl/zikula, production is still postnuke

Made 3 blocks (HTML type),(CenterLeft, CenterMiddle and CenterRight)
And 3 block type position tags,(CenterLeft, CenterMiddle and CenterRight)
And than it looks different from the old postnuke ,

For the welcomes texts I can make a static HTML page whit the pages module and the news module is already available from within Zikula

Somehow I have to connect a HTML file to the position tags and add them to my home.html template.
But how do I get 2 modules and 3 blocks on the same page

Can Anybody shed some light on this, if possible at all

Greetings
Michiel
Hi Michiel
In the BlankTheme project we do this with ease.


All depends on your theme CSS capabilities, because a cross-browser compatible grid is hard to accomplish from scratch. Then we're supported by the YAML CSS Framework to do this with ease. In BlankTheme we can do that with a base home.htm template like:


Code

...
<div id="main">
    <div class="subcolumns">
        <!--[blockposition name='CenterTop']-->
    </div>
    <div id="bt_3b" class="subcolumns coolsubcol">
        <div class="c33l">
            <div class="subcl">
                <!--[blockposition name='CenterLeft']-->
            </div>
        </div>
        <div class="c33l">
            <div class="subc">
                <!--[blockposition name='CenterMiddle']-->
            </div>
        </div>
        <div class="c33r">
            <div class="subcr">
                <!--[blockposition name='CenterRight']-->
            </div>
        </div>
    </div>
    <!--[$maincontent]--> <!--[* with the news man content *]-->
</div>


Performance can be improved using the blockposition plugin of 1.1, because you can use the explode parameter and use only one block position and manage all the blocks by its position in the array like:

Code

<!--[blockposition name='HomeBlocks' assign='homeblocks']-->
...
<!--[$homeblocks.0]-->
...
<!--[$homeblocks.1]-->



May you can find BlankTheme pretty useful for this kind of stuff.
You can port your theme to BlankTheme with ease, there are some wiki pages about it. icon_wink

--
- Mateo T. -
Mis principios... son mis fines
Nestormateo,

What I understand of your responds is the design I like
is easier to create whit Blank Theme

It looks like I have to dive into "blank theme",
this is also a good time to make the theme CSS, now I use a lot of tables.

I hope I have the skills to convert my theme to "Blank Theme"

I hope I can call upon your knowledge again when I'm stuck icon_smile

I?t Sunday and I have something to do, named "Blank Theme" icon_wink

Tanks for you help Nestormateo, Zikula Rules
Hi
I'm in the process of converting my theme to BlankTheme

First of all, fantastic theme, good solid work

I'm editing basemod.css file.

My header and footer Images are 1000px, can I adjust the header and footer "DIV" to this With?
Absolutely,
in BlankTheme there are 2 greater wrappers: #page_margins and #page.
At line ~75, #page_margins defines the width of the theme.
You can set the width to 1000px and it'll affect all the containers icon_wink

Some definitions are marked with a comment /* to remove */
because they usually mess the designs and are just a default example.

There are some rework in the theme configuration
and we'll include a logo-image example in the header, so
if you're just beggining, i recommend you to copy your styles and images into a recent copy of BlankTheme.

Please post any question, doubt or suggestion
i guess that YAML caan support any layout we imagine icon_wink

--
- Mateo T. -
Mis principios... son mis fines
Ok,
there's a new package in our Cozi download section:
http://code.zikula.org/blanktheme/downloads

added:
Rework of the theme configuration and $current variable
3 levels of classes to amplify the CSS control
Added a lang-based CSS class to the body: bt_lang_$lang
Example logo image in the header
Better IE pngfix method

Enjoy! icon_wink


Edit: Article with the details of the recent changes:
http://www.blanktheme.org/News/2008/10/13/And-the-rework-is-finished/



edited by: nestormateo, Oct 13, 2008 - 05:35 AM

--
- Mateo T. -
Mis principios... son mis fines
Oooops
i've introduced a bug in the efa font size javascript translations.
The fix to the bt_htmloutput plugin is available in the revision 317
new package available for download
(or download the corrected file here)

Also did some improvements to the article.

--
- Mateo T. -
Mis principios... son mis fines
Hi
I'm trying to implement the layout as discussed above with the 3 center blocks.

I upgraded to one of the latest versions of BlankTheme

The basis layout is there!

This is what I have in the home.htm

Code

<!--[* $Id: home.htm 262 2008-08-20 08:12:29Z espaan $ *]-->
<!--[* config override *]-->
<!--[ assign var='current' value='home' ]-->
<!--[ assign var='base'    value='grid' ]-->
<!--[ assign var='layout'  value='123_3b' ]-->

<!DOCTYPE html
     public "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<!--[lang]-->">
<head>
<!--[include file='head.htm']-->
</head>

<!-- Home template -->
<body id="bt_<!--[$module]-->" class="<!--[bt_htmloutput section='classesbody']-->">
<!--[include file="base/$base.htm"]-->

<div id="main">
<div class="subcolumns">
<!--[blockposition name='CenterTop']-->
</div>
<div id="bt_3b" class="subcolumns coolsubcol">
<div class="c33l">
<div class="subcl">
<!--[blockposition name='CenterLeft']-->
</div>
</div>
<div class="c33l">
<div class="subc">
<!--[blockposition name='CenterMiddle']-->
</div>
</div>
<div class="c33r">
<div class="subcr">
<!--[blockposition name='CenterRight']-->
</div>
</div>
</div>
<!--[$maincontent]--> <!--[* with the news man content *]-->
</div>
</body>
</html>


Large part is a copy and past of your code

If I remove

Code

<!--[include file="base/$base.htm"]-->


I have no footer and header layout anymore

See http://micware.nl/zikula

I have no layout for Block positions jet! ( CenterLeft, CenterMiddle, CenterRight)

What type of: var='base' and var='layout' must I use ?

I'm stuck icon_frown , it's not my day LOL

Any help appreciated!

Thx,
Michiel

Hey michiel
nice to see your current work.


There's an issue with the way BlankTheme handle this.
I recommend to read this Wiki page: Available layouts and how it works and tell me if you have any doubt about it.


BlankTheme uses a base template (templates in /templates/base subfolder) to handle the body code, and each base template supports one or more layouts. You just need to move the values of the base and layout variables to have different layouts. So, the code i posted should be inside a base template, but not in the module template.


Follow the next steps to accomplish the layout you want:


* Go to the /templates/base subfolder of your theme.


* We'll remove the left and right columns right?
Just like in your graphic. If yes, clone the base template 2col.htm and name it basehome.htm (this will handle the layout of the homepage only)


* This is a customized grid, and it's name is basehome, so set the value to the base variable:

Code

<!--[ assign var='base'    value='basehome' ]-->
<!--[ assign var='layout'  value='1' ]-->

I hope you see the potential and advantages of this in the Wiki pages icon_smile
layout = 1 is to have just the main column.


* Now, clean the home.htm module template,
It should look like:

Code

<!--[* $Id: home.htm 262 2008-08-20 08:12:29Z espaan $ *]-->
<!--[* config override *]-->
<!--[ assign var='current' value='home' ]-->
<!--[ assign var='base'    value='basehome' ]-->
<!--[ assign var='layout'  value='1' ]-->

<!DOCTYPE html
     public "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<!--[lang]-->">
<head>
<!--[include file='head.htm']-->
</head>

<!-- Home template -->
<body id="bt_<!--[$module]-->" class="<!--[bt_htmloutput section='classesbody']-->">
<!--[include file="base/$base.htm"]-->
</body>
</html>
The original with modified values for the variables icon_wink


* Now modify the main layout of your homepage with this code:

Code

<!-- begin: main content area #main -->
        <div id="main">
            <a id="content"></a>
            <!-- skiplink anchor: Content -->
            <div id="bt_ct" class="subcolumns bt_zone">
                <!--[blockposition name='CenterTop']-->
            </div>
            <div id="bt_3b" class="subcolumns bt_zone">
                <div class="c33l">
                    <div class="subcl">
                        <!--[blockposition name='CenterLeft']-->
                    </div>
                </div>
                <div class="c33l">
                    <div class="subc">
                        <!--[blockposition name='CenterMiddle']-->
                    </div>
                </div>
                <div class="c33r">
                    <div class="subcr">
                        <!--[blockposition name='CenterRight']-->
                    </div>
                </div>
            </div>
            <!--[$maincontent]-->
            <div id="ie_clearing">&nbsp;</div>
            <!-- end: IE Column Clearing -->
        </div>
        <!-- end: #main -->



* Ok, i hope this do the homepage layout job.


Finally, playing with Firebug, i want to recommend you some changes in the CSS values:
basemod.css:
* line ~83: Remove the #page border
* line ~74: #page_margins width to 1000px
* line ~89: Remove the #header padding and set height:97px;
* line ~68: Add body background: #333333;
* line ~131: #nav_main background:#222222;
* line ~160: color: #698FAA; and padding: 0.3em 1.2em;
* line ~150: border: 1px solid #282828;
* line ~95: Add to #header #topnav this: top: 20px;
* line ~177: #footer padding to padding: 14px;
content.css:
* line ~208: bold links for #topnav: font-weight: bold;
(anyways seems that #navtop needs a rework over that header, or just remove it)


Hope it help,
these kind of details are the 50% of the port work
tell me how it worked icon_wink

--
- Mateo T. -
Mis principios... son mis fines
Hey Michiel!
i see that the changes are there now,
i guess that this two details can be good in the basemod.css:
* line ~151: modify "border: 1px solid #282828;" to "border-right: 1px solid #282828;"
and remove the next line with the /* to-remove */ comment.
* line ~167: change background to #383838


And to add padding to the contents without corrupt the layout in IE, add the following definition in the final of the content.css stylesheet:

Code

.bt_home #pn-maincontent,
.bt_home .pn-block {
    padding: 0 10px;
}

If you want more side-padding, add some pixels as you wish icon_wink

--
- Mateo T. -
Mis principios... son mis fines
Hi Mateo,

Thanks for you help and excelled advice.
Still working on it as you can see, the shape slowly becomes visible
In the coming week I have more free time to spend on this development.

Thanks so far,
Michiel
Hi,

Matheo: in a old post I read that you use Firebug , I installed it ! It?s great , thx for the Tip

I?m back whit some more questions. Don?t know if they are all BlankTheme related

1) Admin menu, second level (pulldown) is not working in IE7 , FF 3 renders good
2) Installed the Formicula module and this is not rendering good in IE7 (see screen shot)

http://www.micware.nl/images/FFvsIE.jpg

I looked at the code the code en read some threads but can not find what is wrong

Thx for all the help you and the community can give
Michiel
Hi Michiel!
Great that you now use Firebug, it's indispensable in this days icon_wink

Both issues seems BlankTheme related.
First, let's do this:
Remove the pagevars line of the /templates/head.htm:
<-- pagevars -->

Check if the Contact form now works
and see what happen with the admin menu.

--
- Mateo T. -
Mis principios... son mis fines
Hi Mateo,

Removed the line

Code

<!-- pagevars -->
from /templates/head.htm , still the same problem!






edited by: michiel, Oct 30, 2008 - 10:18 PM
Doh,
Have to check the Formicula styles and see what's happening.
About the admin menu problem, it completely doesn't work or the pulldown menu is bad positioned (if yes screenshot please)? It's weird because we've tested it, but anyways, have to see what's causing this icon_wink

--
- Mateo T. -
Mis principios... son mis fines
Hi,
On Firefox it works ok
Internet explorer, on hover , lights up and shows the tip tool, see image

http://www.micware.nl/images/Admin_menu.jpg

The Admin menu is not that important, but if the underlying problem is effecting other parts of the site!
Hi,
I sill have Problems with (I think) CSS based pulldown menu?s in Modules in IE 7
I Use BlankTheme (but other theme?s have the same result)

For example I uses the admin menu and the Admin menu of Downloads 2.2

When I hover with my mouse over it , it light?s up but not dropping down like it suppose to
FirewFox and Google Chrome work fine

I Read something about Quirks mode! Don?t know if it has anything to do with this problem
http://en.wikipedia.org/wiki/Quirks_mode

I see that module Formicula is not rendering well in IE7, also on the Zikula site http://zikula.org/Contact/

I can not find what is wrong
I found out that Formicula is using the content for :before/:after code that is not supported by any version if IE
I don't know if there is a solution for this.
Hi Michiel
I think we'll use another code for the admin panel, and it'll work pretty well. The current menu works ok but seems that is too sensible...

About Formicula styles, have you found a solution?
i haven't realized that cool input styles were broke for IE...

--
- Mateo T. -
Mis principios... son mis fines
Tried some approach, but they are far from clean and it's to many lines of code for a production site
So still looking/try
Also busy with other stuff, I have to divide the time, as all of you have I gues (the problem of dividing your time icon_smile )

Thx for the good work on BlankTheme, Enjoy it so far