Announcement

Collapse
No announcement yet.

Attribute Prompt Colon

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

  • Re: Attribute Prompt Colon

    I just discovered this exact same problem myself, very annoying. You're right, with the sebenza template the colon is configurable, but with the miva default template it always adds a colon after the attribute prompt, whether I have a colon in the prompt or not.

    It looks ridiculous in cases where I use an image link for the prompt instead of plain text.

    Leslie, there is a workaround that's also annoying. Finish each of your attribute prompts with
    HTML Code:
    <span class="attributeColon">
    Then in your Product Attribute Template you put an unbalanced close span after the prompt:
    HTML Code:
    &mvt:attribute:prompt;</span>
    Now when the page is rendered the colon will come up as:
    HTML Code:
    <span class="attributeColon">:</span>
    Now you can control that prompt with CSS and/or javascript.

    Comment


    • Re: Attribute Prompt Colon

      The colon is, in fact, hard coded into both the MMUI and CSSUI attribute components. I'm not sure why, but if I had to guess I'd say it's a legacy carryover from the 4.x MMUI code.

      I'll file a bug and in PR8 Update 6 we'll provide a token for the prompt without a trailing colon and modify the templates to use it and put the colon output into the template code instead. The original "prompt" token will keep the colons for backwards compatibility.
      Last edited by Rick Wilson; 04-09-12, 08:15 AM.

      Comment


      • Re: Attribute Prompt Colon

        While working through the changes proposed above I figured out why we did it in the component modules in the first place.

        The code in the component module adds a colon to the end of the prompt, but only if there isn't one already. This allows the same template code to handle attribute prompts that contain the colon and do not, consistently displaying a single colon after the prompt.

        This is great if you like the colons, not so great if you don't.

        In PR8 Update 6 there will be a new token, attribute:raw_prompt, which contains the prompt exactly as configured by the user. To maintain consistency between versions, however, we won't change the default templates to use raw_prompt--they will retain the present behavior.

        Comment


        • Re: Attribute Prompt Colon

          sounds good to me, thanks!

          Comment


          • Originally posted by burch View Post
            Re: Attribute Prompt Colon
            In PR8 Update 6 there will be a new token, attribute:raw_prompt, which contains the prompt exactly as configured by the user. To maintain consistency between versions, however, we won't change the default templates to use raw_prompt--they will retain the present behavior.
            It's an old post, but good to bring back around. This token does the trick

            &mvt:attribute:raw_prompt;

            Thanks Burch!
            Leslie Kirk
            Miva Merchant Certified Developer
            Miva Merchant Specialist since 1997
            Previously of Webs Your Way
            (aka Leslie Nord leslienord)

            Email me: [email protected]
            www.lesliekirk.com

            Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

            Comment

            Working...
            X

            This website uses cookies to identify visitors, track visitors to our website, store login session information and to remember your user preferences. By continuing to use this site you agree to our use of cookies. Learn More.

            This website uses cookies. By continuing to use this site you agree to our use of cookies. Learn More.

            Accept