PHP Classes

Templates?

Recommend this page to a friend!

      PHP Classes blog  >  Screencast of how to ...  >  All threads  >  Templates?  >  (Un) Subscribe thread alerts  
Subject:Templates?
Summary:Non-semantic template tags.
Messages:4
Author:Jim Isaacs
Date:2009-12-10 03:48:55
Update:2009-12-11 17:27:42
 

  1. Templates?   Reply   Report abuse  
Picture of Jim Isaacs Jim Isaacs - 2009-12-10 03:59:42
I have had a look at the template manager, and I have one criticism. The tags used in the main template are still not semantic. I have a hard time design the placement of bad markup. I would love for this site to be beautiful, but its hard to style tables, tables, and more tables.

Would it be possible to edit the templates used for each tag within the main template?

  2. Re: Templates?   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2009-12-10 04:09:45 - In reply to message 1 from Jim Isaacs
Sorry, no. Most those template variables are generated by PHP components, not static HTML templates.

Tables were used to generate portable HTML. For instance, the navigation bar tabs had to have the same height and automatically adjusted to the content.

I could not find a solution to make them all have the same height, except by set the height to a fixed value, but then it would not adjust to the tab contents.

As for difficulty to style tables, maybe you need to study better the use of CSS selectors to know how to do it. There are some authors that achieved it.

What did you want to do that you could not figure?

  3. Re: Templates?   Reply   Report abuse  
Picture of Jim Isaacs Jim Isaacs - 2009-12-11 17:02:07 - In reply to message 2 from Manuel Lemos
Manuel,

Thank you for your reply.

I am wondering something about what you wrote: "Tables were used to generate portable HTML. For instance, the navigation bar tabs had to have the same height and automatically adjusted to the content."

I can only ask why?
If you are holding a design contest why must some adhere to something visually. You are saying for the "tabs to work", which automatically implies that every design has to use tabular navigation. This in turn creates unnecessary rules that your comment implies can only be achieved with a table, which I still disagree with.

What I understand is that ad-blocks must be a certain size and position. This is of course true, but these are tables too! Which makes me crazy because should ad-units sold in fixed dimensions?

That is the point of the contest isn't for submissions, to for contestants to make the final product. That is too limiting on the overall submissions, (meaning you won't get very many good ones)

Also the most portable HTML is anything but a table.
alistapart.com/articles/practicalcs ...

What I would like is all navigation to be a lists. Or at least an option to use lists.

Here is a link which I will warn you can probably get offensive at points, but I am not giving it to you for any reason for this. It is about 3 years old, but still very relative to my criticisms to the current design and the contest itself.
hotdesign.com/seybold/everything.ht ...

And finally, as simply as I can put it:
flickr.com/photos/nataliejost/12385 ...

---

My suggestions:

You have template tags. So if you don't want to provide full control. Please provide alternate templates, such as.

{navigation} = default template
{navigation.default} = default template
{navigation.list} = list template
{navigation[-]} = horzontal but with contents of [] used as the separator

{logo} = default logo
{logo.alpha} = logo with png24 alpha transparency to really test different background colors without having to worry about a matte. This for the designer's sake to feel better about his/her submission.

{adunit.block.vertical} = Ad unit with a fixed width and hieght (no tables)
{adunit.block.horizontal} = Ad unit with a fixed width and hieght (no tables)
{adunit.multiline} = Ad without a fixed width or hieght, but it is multiline meaning design must account for this, can be with simple lorem ipsum.
{adunit.singleline} = Ad without a fixed width or hieght, it is one singline meaning design must account for this, can be with simple lorem ipsum.

  4. Re: Templates?   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2009-12-11 17:27:42 - In reply to message 3 from Jim Isaacs
The first thing that you must get right is that the contents of the template variables are not subject of this contest.

Another point is that using tables is not a sin. You will not go to hell when you die if you use tables in your sites. Being pedantic or religious about using or not using tables will lead you nowhere.

Tables have a purpose. They guarantee that cells in the same column or row have the width or height. That is why they are used in navigation bars.

Actually, table layouts was recknoned by W3C to be so important that there are now CSS 3 properties to use them. Too bad that not all browsers support CSS 3 well.

Anyway, the use of tables should not prevent you from styling the contents of navigation bar cells.

There are several authors that cleverly used CSS selectors to style each navigation bar with different sets of styles.

If you are having difficulties about styling navigation bars in a particular way, just let me know what you wanted to do, so I can advise.

As for advertising, the sizes are fixed by IAB standards that all Web advertising agencies follow. I could not change the standard sizes if I wanted.

iab.net/

As for your template marks suggestion, it already works somewhat like you describe. Some template marks have layout alternatives. For instance, navigation bars can be switched to render vertically or even without borders.

If you did not watch the screencast announced this week in the PHPClasses blog, you may want to watch it know to watch it now, as it explains how that works.

phpclasses.org/blog/post/110-Screen ...

It is not a new thing. It was explained before in the PHPClasses blog. I suspect that some people are complaining about things that already work the way they would like, but they are not aware because they are not following the site blog.

phpclasses.org/blog/post/104-Submit ...