| Previous · Next | |
| User | Message |
|
rogier
|
Date: 9/22/2008 5:53 am · Subject: Recurring classes and IDs - generic asset template · Rating: 0
To get the discussion started I made a template which includes:
----- <div id="[assetname]<tmpl_var assetId>" class="[assetname] [specific asset]"> ----- |
| Back to Top |
Rate [ | ]
|
|
rogier
|
Date: 9/22/2008 6:01 am · Subject: Re: Recurring classes and IDs - generic asset template · Rating: 0
And once more with comments (also attached as html):
----- <div id="[assetname]<tmpl_var assetId>" class="[assetname] [specific asset]"> ----- Please let me know what y'all think. Does the above make sense to you? Is this a good way of going about these things or is posting template code confusing?
Rogier | United Knowledge Attached Files |
| Back to Top |
Rate [ | ]
|
|
dionak
|
Date: 9/23/2008 11:38 am · Subject: Re: Recurring classes and IDs - generic asset template · Rating: 0
Rogier, This makes sense to me. My only comments are: * Is the div surrounding the attachments ul just for a 'hook' for css? * Instead of clearing with a div, I suggest changing that to a br element. It's not really a page division. * What template is this? Diona ---- |
| Back to Top |
Rate [ | ]
|
|
rogier
|
Date: 9/23/2008 12:36 pm · Subject: Re: Recurring classes and IDs - generic asset template · Rating: 0
That, and for positioning of the attachments as well. It's not really necessary, but I think that designers would find it easy to have each element (or at least many elements) of a template in a containing div. If you're worrying about divitis, we could remove the div and add the "attachments" class to the ul and that'll work as well.
Fine by me.
I just picked the pieces of code that reccur in many, if not all, templates. Together it's allmost an article template. I didn't want this to be a discussion just about the article, but more about setting some general rules for asset templates.
Rogier | United Knowledge |
| Back to Top |
Rate [ | ]
|
|
dionak
|
Date: 9/23/2008 12:55 pm · Subject: Re: Recurring classes and IDs - generic asset template · Rating: 0
I can see how the div would be useful. It's fine. I just want to keep an eye on markup overuse.
Diona ---- |
| Back to Top |
Rate [ | ]
|
|
rogier
|
Date: 9/24/2008 1:43 pm · Subject: Re: Recurring classes and IDs - generic asset template · Rating: 0
And I'm glad you do! Other comments, anyone?
Rogier | United Knowledge |
| Back to Top |
Rate [ | ]
|
|
tabb
|
Date: 10/29/2008 4:34 pm · Subject: Re: Recurring classes and IDs - generic asset template · Rating: 0
I think this looks very good. I agree that wrapping things in a containing div is useful for positioning elements. |
| Back to Top |
Rate [ | ]
|
|
rogier
|
Date: 2/4/2009 4:20 am · Subject: Re: Recurring classes and IDs - generic asset template · Rating: 1
It's a detail, but after doing some more reading on accessability, I realized that using two a tags for attached files does not go well with text (-to-speech) browsers; it doesn't comply with WCAG. The html for a file in the attachment loop now looks like this: <a href="<tmpl_var url>"><img src="<tmpl_var
icon>" alt="<tmpl_var filename>" class="wg-attach"
/></a> This is done to prevent the underline of the link to appear below the image. However this will result in two links to the same location. I'll be changing the attachment loop code to this: <img src="<tmpl_var icon>" alt="<tmpl_var filename>" class="wg-attach" /> <a href="<tmpl_var url>"><tmpl_var filename></a> Which is shorter and easier to comprehend anyway. Also the alt attribute of the image should not be the filename, but the file extension (RFE posted).
Rogier | United Knowledge |
| Back to Top |
Rate [ | ]
|