Why is your structure for templates the way it is?

Are your templates made to prevent editing? The styles and markup are very difficult to follow.

4 answers

Profile photo of Daniel Pegues 0.00 $tone June 17, 2011
Public

Structurally, for example, things like the following:
<div class="main">
<div class="main-inner1">
<div class="main-inner2">

and

<ul class="form-list">
<li class="fields">
<div class="field">
<label class="required" for="name">
<div class="input-box">
<input id="name" class="input-text required-entry" type="text" value="" title="Name" name="name">
</div>
</div>
<div class="field">
</li>
<li>
<li class="wide">
</ul>

What is the reason for so many unnecessary divs -- the ones above are just examples of what is done all throughout.
Why are forms being put in as unordered lists?

CSS-wise, I’ve faced problems with being able to edit styles so that I can have custom H1’s, H2’s, H3’s, ul’s, ol’s, etc. This is very very difficult as a result of CSS being scattered all over the place, with overrides here and there and everywhere. For typography, styles should be localized to a specific region of a template, ie, header, content body (which can be broken down into sub local regions), and footer. Instead, the CSS is done at the top parent level, then just added in frivolously everywhere.

I’m already in the process of rebuilding the template; for the most part, I am just curious as to why the magento templates are made the way they are, as mentioned above. The ability to edit is not taken into account -- or, is this done intentionally to prevent the ability to customize the template without having to rip it apart?
Perhaps my concern will be construed as nothing more than a rant.

Thanks for your time.

#2
Profile photo of Daniel Pegues 0.00 $tone June 17, 2011
Public

Thank you for your reply tcraw1010. Also, I am sure people will find the learning resources provided to be helpful.

I’ve finished gutting and redoing the header, outer parent layers of the content body and the footer. Things are coming along well.

Have a great weekend!

#4

This question is now closed

Written By

Comments