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}}"); ?></span><br /> <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]
*******************************************************************

Reply via email to