Announcement

Collapse
No announcement yet.

Replace Ampersand (&) with HTML Entity (&) in URL Links

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Replace Ampersand (&) with HTML Entity (&) in URL Links

    Hi, I have a Miva Merchant 5.5 CSSUI store. I'm trying to change my links

    from:
    ...Store_Code=ufp&Screen=CTGY&Category_Code=parts

    to:
    ...Store_Code=ufp&Screen=CTGY&Category_Cod e=parts

    so that they validate with the W3C markup validator. How can I modify the link templates so they use & instead of &?

    #2
    Re: Replace Ampersand (&) with HTML Entity (&) in URL Links

    You can do this by modifying each page template in the admin where those links appear and replacing the links that are there. Many of them will need to be done manually as they're generated by a dynamic link variable like &mvt:product:link; or a cssui_links item call.

    For example on CTGY in the Category Display Layout tab you can track down the anchor(s) and replace &mvt:product:link; with /mm5/merchant.mvc?Store_Code=&mvt:store:code;&Scree n=PROD&Product_Code=&mvt:product:code;

    Or, to be honest, you can just ignore that validation warning. As long as your pages are using HTML5 doctype (<!DOCTYPE HTML>), I wouldn't consider this to be worth the time to change on all of your pages. Every browser ever made will interpret & in a query string properly because you can't have ; in a URL, and search engines don't care either.
    Last edited by KNewbrough; 03-04-14, 02:57 PM.
    Kyle Newbrough
    Technical Support / Web Developer
    Miva Merchant

    Comment

    Working...
    X