Elxis CMS Forum

Extensions => Templates => Topic started by: marcin on July 24, 2007, 15:46:00

Title: Frustrated with content section formatting...
Post by: marcin on July 24, 2007, 15:46:00
For first - hello from Poland and regards to the Elxis developers! You're, guys and gals (?), doing a lot of good work.

I'm strongly impressed with powerful abilities I've doscovered during my first atempt to play with mambo-like CMS. I must astonishly figure that Elxis have couple of features I saw implemented in expensive, commercial systems custom-made for the global corporation I used to work for!

But there still are several things a little bit frustrating for me.

First of all is repeatly returning issue of controlling the appearance of content on the lauoyt.  There is a painful lack of tool for setting and controlling position and formatting of the particular element in the content area. You can tell - there are .table .td etc. classes to controll it form the css level, but actually it isn't working fine for me.

Maybe someone could help?

Let's start the case study:

I have simplest layout people can imagine. You can look at onepge static version at http://www.gilpa.krakow.pl/habryn/

The layout was designed for multilingual site of a small industrial company with a lot of overseas customers. Layout was designed as a simple, clean, transitional form and without layout tables, messy scripting etc.

My choice of Elxis as a CMS engine for this site was founded on the multilanguage abilities of this system, so I've started preparing a template based on my layout. As I'm not a programmer at all I went through the valey of darkness with tables of mainmenu module (changed them manually in proper .php file into the parametrised divs) and language selector (added switch{} and variable  to show ".pl", ".de" instead  filename as the language name. But when I started to fill my site with dummy content I surprisely figured that I cannot controll the appearance of the main content module. Of course I can switch on and off many things i.e. pdf icons but cannot manage them to appear i.e. as the textlinks at the bottom of content frame (as in the static "design" layout). Maybe I did not find the controls? I did not find any english documentation - only this support board. 

But the most frustrating thing I've figured is the 1-2 pixel gap between the top of left menu (formatted with divs) and the top of the content module served by Elxis (based on tables). I spend 2 days to find how to avoid this and still nothing. Of course there isn't any distance between top edges of the modules when Elxis is serving content as raw text (i.e. no content messages)

Could you please help me?

You The Elxis-powered site is at http://www.habryn.com (look at polish version where are couple of  dummy texts published)

Thanks in advance!


     
 

 
Title: Re: Frustrated with content section formatting...
Post by: datahell on July 24, 2007, 19:34:32
Did you modified elxis code to insert
<div class="pozycjamenu">
instead of
<div class="moduletable">
?
If yes, I suggest you to turn it back.

Do not modify elxis code inorder to change css. Use your's templates css file. You can also modify the appearence of idividual pages or small pieces of code by setting css suffixes on modules/components etc parameters.

You can completely change the appearence to anything with your own css. It's no need to modify elxis for this.

In your template's index.php file:

<?php mosLoadModules('position', 'style'); ?>

where position like left, right, user1 etc
and style:
0 : display modules wrapped with table
-2: display modules  wrapped with divs
-1: display modules without any wrapping element

The above generates html as bellow (style=0):
<table cellpadding="0" cellspacing="0" class="moduletable-SUFFIX">
module here
</table>

or style(-2):

<div class="moduletable-SUFFIX">
module here
</div>

By default suffix is empty, you can set suffix to any module by editing module's parameters to change appearence to that specific module.
Title: Re: Frustrated with content section formatting...
Post by: marcin on July 25, 2007, 09:58:25
Hello Datahell,
thanks for the answer!

Quote
<?php mosLoadModules('position', 'style'); ?>

where position like left, right, user1 etc
and style:
0 : display modules wrapped with table
-2: display modules  wrapped with divs
-1: display modules without any wrapping element

Do you mean "wrapped" as outlined? Or "wrapped" as "structured by"? 

1. I tried to call login module with -2 or -1 parameter and there still was tables in layout. Maybe I did something wrong.

2. My major question is how to "untabelarize" main content area.
In my template its called from
<?php mosMainBody(); ?>
without any parameters and I think the tables are statically written into the structure of main body.
Or maybe this kind of calling mainbody is not proper?

Quote
Do not modify elxis code inorder to change css. Use your's templates css file. You can also modify the appearence of idividual pages or small pieces of code by setting css suffixes on modules/components etc parameters.

You can completely change the appearence to anything with your own css. It's no need to modify elxis for this.

Of course i played with suffixes, its a very good feature but I can't do everything with them in my particular layout. I decided to edit mainmenu module code because I needed to wrap every mainlevel entry of the menu and their sublevels with one div container. So every level entry (main and sub)  have css classes and there is an additional class for wrapping main and sub entries in a group. By default I can set classes (suffixes) for menu entries, different for any level but I cannot wrap main entry with their sub entries in ONE GROUP. My additoinal class "pozycjamenu" is setting bottom padding between  main menu groups (both opened and closed) and generated htlm code should look like:

Code: [Select]
<div id="lewa" >
<div class="pozycjamenu">
<div class="menu1"><a href="#" class="menu1">about the company</a></div>
</div>
<div class="pozycjamenu">
<div class="menu1">
<a href="#" class="menu1">FastEnFiX fasteners</a>
</div>
            <div class="menu2">
<a href="#" class="menu2">technology</a>
</div>
            <div class="menu2">
<a href="#" class="menu2">series overview</a>
</div>
            <div class="menu2">
<a href="#" class="menu2">detailed specs</a>
</div>
            <div class="menu2">
<a href="#" class="menu2">comparisions</a>
</div>
            <div class="menu2">
<a href="#" class="menu2">mounting</a>
</div>
            <div class="menu2">
<a href="#" class="menu2">certificates</a>
</div>
</div>
<div class="pozycjamenu">
<div class="menu1"><a href="#" class="menu1">research</a></div>
</div>
<div class="pozycjamenu">
<div class="menu1"><a href="#" class="menu1">licensing</a></div>
</div>
<div class="pozycjamenu">
<div class="menu1"><a href="#" class="menu1">distribution</a></div>
</div>
<div class="pozycjamenu">
<div class="menu1"><a href="#" class="menu1">legal informations</a></div>
</div>
<div class="pozycjamenu">
<div class="menu1"><a href="#" class="menu1">contatct us</a></div>
</div>
</div>

How can I do with default mod_mainmenu?

Quote
You can completely change the appearence to anything with your own css. It's no need to modify elxis for this

I decided to completely change the way how language selector works.  First reason was the lack of possibility to controll the way how different browsers on different OS'es are rendering this interactive element. This will allways look diffrent in Mac and Win, it also depends on particular color scheme installed in user machine. The second reason is my predilection to avoid links handled by javasctip events. I do not use anything that cannot be handled by my cellphone browser ;-) Why? My customers sometimes using my websites on the dessert or polar construction sites and most of them is using smaller or bigger but mobile eqiupement with restrictions in interpreting code and bandwidth. Thats the second reason why I'm avoiding tables. When I attach media-based css to my site I'm sure it can be browsed with an old nokia.

Title: Re: Frustrated with content section formatting...
Post by: datahell on July 25, 2007, 10:19:17
Unfortunately you can not get rid of all tables with the Elxis 2006.x series. (Elxis 2008 is totally table-less and XHTML/W3C compatible). Module styles (0, -1, -2) just changes the wrapping element not the module's html. If a module has hardcoded tables it will display tables in it's inner html.

You don't have to edit any module to change css! Just edit your css file. If mainmenu has style equal to -2 is displayed using ul and li elements inside a div.

Don't use "#" links. Use "javascript:;" instead.

As for the language module: if you display just flags you have the desired result (single links accessible by any browser).

I recommend you not to modify the source code because you will have problems later on update. Elxis 2008 changes everything in frontend...