Re: [WSG] styling address tag or microformat hcard

2008-06-05 Thread Robert O'Rourke

tee wrote:


On Jun 4, 2008, at 2:07 AM, Robert O'Rourke wrote:

 So you could have:

defaultFormat![CDATA[

div class=vcard
  div class=n{{var firstname}} {{var lastname}}/div
  {{depend company}}div class=org{{var company}}/div{{/depend}}
  div class=adr
  span class=street-address
  {{var street1}}
  {{depend street2}}{{var street2}}br /{{/depend}}
  /span

...etc...

]]/defaultFormat


Rob, thank you so much!

It still wrapped inside the address tag, I afraid it may throw the 
site into hundred lines of errors if I remove the address tag 
altogether in many of the php and phtml files. Guess I just have to 
live with it.


Best,
tee


No problem, I don't think there will any problems with removing the 
address tags but it depends on whether or not you have the time to go 
through the templates and test it out. I'm doing the same thing myself 
at the moment inbetween other projects so hopefully they'll consider 
changing the markup with a future release.


-Rob



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] styling address tag or microformat hcard

2008-06-04 Thread Robert O'Rourke

tee wrote:


On Jun 3, 2008, at 4:49 PM, tee wrote:




Thierry


afaik, the address element is not supposed to contain this kind of
information as it is related to the people who maintain/are 
responsible

for the document itself (or a section of the document).


It's a plain English but I read it many times, still I don't quite 
understand what you meant by 'not supposed to contain this kind of
I look into the Mage folder, and the file I found that maybe 
controlling the address globally is located in 
'Mage/Customer/etc/config.xml'.




Forgot to add, strictly speaking, that address is xml format, not html 
address tag correct?


here is the code:
html translate=title module=customer
titleHTML/title
htmlEscapetrue/htmlEscape
defaultFormat![CDATA[
{{var firstname}} {{var lastname}}br/
{{depend company}}{{var company}}br /{{/depend}}
{{var street1}}br /
{{depend street2}}{{var street2}}br /{{/depend}}
{{depend city}}{{var city}},  {{/depend}}{{depend postcode}}{{var 
postcode}}, {{/depend}}{{var region}}br/

{{var country}}br/
{{depend telephone}}Tel: {{var telephone}}{{/depend}}
{{depend fax}}br/F: {{var fax}}{{/depend}}
]]/defaultFormat


I found this 'How to add style to XML'in W3C site.
http://www.w3.org/Style/styling-XML

tee


It won't be that XML that you are styling, it just allows you to define 
an HTML snippet that is used when the template calls addresses. 
Everything inbetween the ![CDATA[ ]] section in the defaultFormat 
tag will be written into the HTML so you can write your custom HTML 
there. So you could have:


defaultFormat![CDATA[

div class=vcard
   div class=n{{var firstname}} {{var lastname}}/div
   {{depend company}}div class=org{{var company}}/div{{/depend}}
   div class=adr
   span class=street-address
   {{var street1}}
   {{depend street2}}{{var street2}}br /{{/depend}}
   /span

...etc...

]]/defaultFormat

-Rob


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] styling address tag or microformat hcard

2008-06-04 Thread tee


On Jun 4, 2008, at 2:07 AM, Robert O'Rourke wrote:

 So you could have:

defaultFormat![CDATA[

div class=vcard
  div class=n{{var firstname}} {{var lastname}}/div
  {{depend company}}div class=org{{var company}}/div{{/depend}}
  div class=adr
  span class=street-address
  {{var street1}}
  {{depend street2}}{{var street2}}br /{{/depend}}
  /span

...etc...

]]/defaultFormat


Rob, thank you so much!

It still wrapped inside the address tag, I afraid it may throw the  
site into hundred lines of errors if I remove the address tag  
altogether in many of the php and phtml files. Guess I just have to  
live with it.


Best,
tee



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



[WSG] styling address tag or microformat hcard

2008-06-03 Thread tee

In Magento, they use
address.../address
for customer address.

It lacks flexibility for styling as I can't have other html tags place  
inside the address tag. I  wonder if there is a semantical way to do  
it and that it produces no validation error. Also,  if any of you have  
started developing sites in Magento, do you know if I can incorporate  
Microformat hcard easily?


Many thanks!

tee



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



RE: [WSG] styling address tag or microformat hcard

2008-06-03 Thread Thierry Koblentz
Hi Tee,
 
 In Magento, they use
 address.../address
 for customer address.

afaik, the address element is not supposed to contain this kind of
information as it is related to the people who maintain/are responsible
for the document itself (or a section of the document).

 
 It lacks flexibility for styling as I can't have other html tags place
 inside the address tag. I  wonder if there is a semantical way to do
 it and that it produces no validation error. Also,  if any of you have
 started developing sites in Magento, do you know if I can incorporate
 Microformat hcard easily?

That's the way to go, but I don't know about Magento


-- 
Regards,
Thierry | http://www.TJKDesign.com






***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] styling address tag or microformat hcard

2008-06-03 Thread Robert O'Rourke

Thierry Koblentz wrote:

Hi Tee,
 
  

In Magento, they use
address.../address
for customer address.



afaik, the address element is not supposed to contain this kind of
information as it is related to the people who maintain/are responsible
for the document itself (or a section of the document).

 
  

It lacks flexibility for styling as I can't have other html tags place
inside the address tag. I  wonder if there is a semantical way to do
it and that it produces no validation error. Also,  if any of you have
started developing sites in Magento, do you know if I can incorporate
Microformat hcard easily?



That's the way to go, but I don't know about Magento
  


Hi Tee,

under 
app/design/frontend/default/default/template/customer/address.phtml you 
can use this code inplace of where it says 'address../address' (line 
30 or thereabouts).


   div class=vcard
   div class=n
   span class=given-name?php echo 
$_address-toString({{firstname}}); ?/span
   span class=family-name?php echo 
$_address-toString({{lastname}}); ?/span

   /div
   div class=adr
   span class=street-address?php echo 
$_address-toString({{street}}); ?/span
   span class=locality?php echo 
$_address-toString({{city}}); ?/spanbr /
   span class=region?php echo 
$_address-toString({{regionName}}); ?/span
   span class=postal-code?php echo 
$_address-toString({{postcode}}); ?/span

   /div
   div class=tel
   T: span class=value?php echo 
$_address-toString({{telephone}})); ?/span

   /div
   /div

It's not ideal, there might be some missing fields for example so it's 
usually best to only write out the surrounding HTML when the variable is 
present. There's a bunch of places where addresses appear aswell as this 
but that don't give you an easy way of separating out the parts of the 
address eg. book.phtml - for that file i just replaced address with 
div class=adr.


Hope that gets you started

-Rob


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] styling address tag or microformat hcard

2008-06-03 Thread Adam Martin
There are no limitations with Magento when it comes to templates / 
layout etc. So you could easily implement hcard.

Cheers
Adam (www.tweakmag.com)

tee wrote:

In Magento, they use
address.../address
for customer address.

It lacks flexibility for styling as I can't have other html tags place 
inside the address tag. I  wonder if there is a semantical way to do 
it and that it produces no validation error. Also,  if any of you have 
started developing sites in Magento, do you know if I can incorporate 
Microformat hcard easily?


Many thanks!

tee



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***





***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] styling address tag or microformat hcard

2008-06-03 Thread tee



Thierry


afaik, the address element is not supposed to contain this kind of
information as it is related to the people who maintain/are  
responsible

for the document itself (or a section of the document).


It's a plain English but I read it many times, still I don't quite  
understand what you meant by 'not supposed to contain this kind of


information as it is related to the people who maintain/are  
responsible

for the document itself (or a section of the document).'



under app/design/frontend/default/default/template/customer/ 
address.phtml you can use this code inplace of where it says  
'address../address' (line 30 or thereabouts).


Thanks Rob, for the example, I will try it out, however I don't think  
this is the right file and suspect it's not used anywhere in the site,  
because it has table markup. In the customer/my dashboard page, the  
address section is pulled from 'customer/account/dashboard/ 
address.phtml' which is pulled from this ' ?php echo $this- 
getPrimaryBillingAddressHtml() ?' and this '  ?php echo $this- 
getPrimaryShippingAddressHtml() ?'. In the onepage checkout, there  
is also an address section located in the 'progress.phtml', with this  
code:
 address?php echo $this-getShipping()-format('html') ?/ 
address. I look into the Mage folder, and the file I found that  
maybe controlling the address globally is located in 'Mage/Customer/ 
etc/config.xml'.


So Adam, while it has no limitations changing template and layout (I  
know first hand how much freedom Magento gives to web designer as I  
have literally changing every line of html code in every phtml  
file :), but this address thing, I have not yet figured out and can't  
find a way to edit it at all.


Magento is really great and they have done a terrific job, I do  
thinkt, the 'web standard' and 'semantic' part fall short, but as a  
user, I don't feel I can't expect much from them to deliver a 'much  
better' web standard compliant software - I wanted to use 'perfect'  
this word, but reminded myself there isn't a 'perfect' web standard  
solution but a good/best practise :)


tee



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] styling address tag or microformat hcard

2008-06-03 Thread tee


On Jun 3, 2008, at 4:49 PM, tee wrote:




Thierry


afaik, the address element is not supposed to contain this kind of
information as it is related to the people who maintain/are  
responsible

for the document itself (or a section of the document).


It's a plain English but I read it many times, still I don't quite  
understand what you meant by 'not supposed to contain this kind of
I look into the Mage folder, and the file I found that maybe  
controlling the address globally is located in 'Mage/Customer/etc/ 
config.xml'.




Forgot to add, strictly speaking, that address is xml format, not html  
address tag correct?


here is the code:
html translate=title module=customer
titleHTML/title
htmlEscapetrue/htmlEscape
defaultFormat![CDATA[
{{var firstname}} {{var lastname}}br/
{{depend company}}{{var company}}br /{{/depend}}
{{var street1}}br /
{{depend street2}}{{var street2}}br /{{/depend}}
{{depend city}}{{var city}},  {{/depend}}{{depend postcode}}{{var  
postcode}}, {{/depend}}{{var region}}br/

{{var country}}br/
{{depend telephone}}Tel: {{var telephone}}{{/depend}}
{{depend fax}}br/F: {{var fax}}{{/depend}}
]]/defaultFormat


I found this 'How to add style to XML'in W3C site.
http://www.w3.org/Style/styling-XML

tee



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



RE: [WSG] styling address tag or microformat hcard

2008-06-03 Thread Thierry Koblentz
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of tee
 Sent: Tuesday, June 03, 2008 4:49 PM
 To: wsg@webstandardsgroup.org
 Subject: Re: [WSG] styling address tag or microformat hcard
 
 
 Thierry
 
  afaik, the address element is not supposed to contain this kind of
  information as it is related to the people who maintain/are
  responsible
  for the document itself (or a section of the document).
 
 It's a plain English but I read it many times, still I don't quite
 understand what you meant by 'not supposed to contain this kind of
 
  information as it is related to the people who maintain/are
  responsible
  for the document itself (or a section of the document).'

From: http://www.w3.org/TR/REC-html40/struct/global.html#h-7.5.6

The ADDRESS element may be used by authors to supply contact information
for a document or a major part of a document such as a form. This element
often appears at the beginning or end of a document.


-- 
Regards,
Thierry | http://www.TJKDesign.com







***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***