anth
Karma: 0
|
Why arent we using a Definition List? - 2009/03/17 21:26
Maybe there's a really simple reason, but has this really been overlooked?
My understanding is that definition list is the best html syntax to use for a glossary, eg:
| Code: |
<dl><dt>Term1</dt>
<dd>Definition of Term1</dd>
<dt>Term2</dt>
<dd>Definition of Term2</dd>
<dt>Term3</dt></dl>
|
Its not very hard to modify the code to produce the above output. I did this for a site a while ago (http://www.riancorp.com/component/option,com_definition/Itemid,63/) , using this component, but I hacked the code so hard it bled - not a very elegant job, but it worked.
I am presuming that this is worth doing for the considerable SEO benefits, which is why I am listing it here as a Feature Request.
If I get to do the modifications again on another site I'll try to be more careful & record my changes or something, but I'm hoping someone else will get to it first & save me the trouble. It wasn't pleasant last time from memory.
Thanks to whole community for a very useful component!
Post edited by: mahageekster@gmail.com, at: 2009/03/17 21:27
The greater our command over language, the sharper are the tools we have in which to dissect reality. |
|
|
| | Sorry, you do not currently have permission to write here. |
admin
Karma: 98
|
Re:Why arent we using a Definition List? - 2009/03/18 11:45
In principle, you are absolutely right. Changing the code in Glossary 2.5+ should be a lot easier since it was totally rewritten. You'll find the HTML is very accessible in heredocs.
I've had a stab at doing it, which was mostly easy, but ran up against a problem. Right now, I do not know how to persuade browsers to line up the top of the term and the top of the definition, and it looks untidy with the default browser behaviour of definitions dropped below terms. Any ideas?
Martin Brampton aka Counterpoint http://aliro.org http://black-sheep-research.com |
|
|
| | Sorry, you do not currently have permission to write here. |
anth
Karma: 0
|
Re:Why arent we using a Definition List? - 2009/03/18 18:31
I do not know how to persuade browsers to line up the top of the term and the top of the definition
Yes, no luck here either. It can have the appearence of lining up, so long as the definition term text does not wrap. The dd can wrap no probs.
Not having experimented & tested much thus far, but I would expect my example below could break fairly easily between browsers, and css environments. But for some people it may be sufficient.
http://www.porthughesaccommodation.com.au/definition.html
| Code: | dl.tidier dt {
background-color: #CCCCCC;
width: 200px;
padding-left: 10px;
padding-top: 5px;
padding-bottom:
5px;
border-top-width: 1px;
border-top-style: dotted;
border-top-color: #ffffff;
}
dl.tidier dd {
margin-top: -30px;
margin-left: 220px;
width: 400px;
padding-bottom: 5px;
padding-top: 5px;
border-top-width: 1px;
border-top-style:
dotted;
border-top-color: #CCCCCC;
}
|
The greater our command over language, the sharper are the tools we have in which to dissect reality. |
|
|
| | Sorry, you do not currently have permission to write here. |
admin
Karma: 98
|
Re:Why arent we using a Definition List? - 2009/03/18 18:35
There will be a way to set a user name that is not email, right now there is a technical problem.
Have a look at the Glossary at http://j15.joomlaguru.net. Does the XHTML there suit you? I had to wrap the pairs of term and definition in divs to make it tidy.
Martin Brampton aka Counterpoint http://aliro.org http://black-sheep-research.com |
|
|
| | Sorry, you do not currently have permission to write here. |
anth
Karma: 0
|
Re:Why arent we using a Definition List? - 2009/03/18 19:37
Yes, the example looks more than sufficient for most usages that I can imagine. I probably wouldnt be styling odd/even, but thats quite easy to control via css.
The main thing is the DL DT DD tags & they look correctly formed. Personally not too worried about the appearance as I style this to each customer's needs & most of the time its not human views I'm concerned about. But others will appreciate a default neat appearence.
This is quite exciting. Hard to find a site that would not benefit from the xtra keyword richness that this would provide.
Thanks for your fast attention. Actually its not anywhere on my 'to do' list, but I have been wanting to ask about this issue ever since I first installed Glossary about a year ago.
I hope that the new code can eventually make it into the distribution as I think it would bring a lot of benefits to people & I would be certainly using it a lot more. Let me know if i can help, but quite snowed under with deadlines so slowness is the rule.
The greater our command over language, the sharper are the tools we have in which to dissect reality. |
|
|
| | Sorry, you do not currently have permission to write here. |
admin
Karma: 98
|
Re:Why arent we using a Definition List? - 2009/03/20 16:28
Actually, it was not so easy, because wrapping the pairs of dt, dd with a div is illegal and generates a load of errors from the W3C validator. So there is now a further revision at the test site, and it does not look so neat. But it uses definition lists, and as you say people with CSS capabilities can vary the styling to suit the circumstances.
You should have received an email from me about how to change your user name to remove email address, or there is information on the home page.
Martin Brampton aka Counterpoint http://aliro.org http://black-sheep-research.com |
|
|
| | Sorry, you do not currently have permission to write here. |
|