Can you hide an attribute template based on the id of the template

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • amecca
    Mivite

    • Oct 2007
    • 106

    #1

    Can you hide an attribute template based on the id of the template

    I have a page that is php based. It passes the values to a template with id "DYM". But this template is not visible on the page. However I would like to add an attribute to the product that I would like to be visible but I can't make it visible without making the "DYM" template visible as well.

    So I would like to write an "if" statement that says something like:

    <mvt:if expr="attribute_template EQ 'DYM'">
    then dont show the template
    <mvt:else>
    </mvt:if>
    Alan Mecca
    President
    8:30-5:00 M-Th, 8:30-4:30 F
    T: 800-899-0620
    E: [email protected]
    www.personalizeddoormats.com

  • wcw
    Developer Partner

    • Mar 2006
    • 11329

    #2
    Re: Can you hide an attribute template based on the id of the template

    If you have the current Emporium Plus Tool Kit you could test for the template code before the item product_attributes is run on the PROD page. The function attr (and attrc) can display all of the attribute codes (and the children codes of attributes inside an attribute template). Using that you could test for the DYM and then write conditional code to hide or show. Course the template attributes would have to be "NOT required" otherwise they would get the missing attribute screen. Using Tool Kit (v5.251 or newer) put this code on the PROD page and see what it displays.

    <mvt:item name="toolkit" param="attrc|acount|g.Product_Code" />
    <mvt:foreach iterator="attrs" array="tkattributelist">
    <br>&mvte:attrs:code; &mvte:attrs:prompt;
    <mvt:if expr="l.settings:attrs:attemp_id">
    <br>&nbsp;&nbsp; &mvte:attrs:children;
    </mvt:if>
    </mvt:foreach>
    Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
    Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
    Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
    Facebook http://www.facebook.com/EmporiumPlus
    Twitter http://twitter.com/emporiumplus

    Comment

    Working...
    X