Announcement

Collapse
No announcement yet.

Customising PRODUCTLINKs

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

    Customising PRODUCTLINKs

    I'm trying to style the 'more info' links for products.
    In Act_ProductLine I found:
    NETQUOTEVAR:PRODUCTBEGINLINK NETQUOTEVAR:PRODUCTLINKTEXT NETQUOTEVAR:PRODUCTENDLINK

    This generates:
    <A HREF="...">More on Widget 25</A>

    I'd like to be able to generate:
    <A HREF="..." class="mystylesheet">More on Widget 25</A>

    I found a post for v5 on this that pointed me to Design->Text but I'm lost in there. There are way too many text items and no apparent way of working out which is used where.

    Suppose I wanted different stylesheets for different products?. Is there any way of adding the stylesheet parameterically e.g. accessing it as a user-defined NETQUOTEVAR that takes it's value from a customer property of the product?
    -

    #2
    I found a post for v5 on this that pointed me to Design->Text but I'm lost in there.
    You can use the search facility in Design text to look for all "<A HREF=". Now replace each one with "xyz1<A HREF=" and the next "xyz2<A HREF=" and so on.

    Now preview a page and you can see which one is involved. Then back into Design / Text to remove all the other xyz1 xyz2 etc to restore things as usual.

    Once you've located the text you can use a custom property to set a class for each item. Assuming the NETQUOTEVAR:PRODUCTBEGINLINK is expanded via <A HREF="%s"> then you can replace that bit of design text with

    <A HREF="%s"

    note no closing quote but a trailing space. Now in all your product templates replace NETQUOTEVAR:PRODUCTBEGINLINK with

    NETQUOTEVAR:PRODUCTBEGINLINKCUSTOMVAR:LINKSTYLE

    and set CUSTOMVAR:LINKSTYLE in Design / Options / Site Defaults to be

    >

    or

    class="defaultlink">

    and in Products with different styles set it to

    class="myspecialclass">


    Norman
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      >Now replace each one with "xyz1<A HREF=" and the next "xyz2<A HREF=" and so on.
      ...
      >Then back into Design / Text to remove all the other xyz1 xyz2 etc to restore things as usual.

      I should have said apparent except the obvious. I've been doing this elsewhere. In my book, this is reverse-engineering and the need to do that reveals a big hole in the docs.
      Isn't there a map of what gets used where?

      I've worked round it by wrapping the instance in the template with a <span class=xyz> and defining a style sheet for:
      SPAN.xyz A
      -

      Comment


        #4
        reverse engineering
        There's an addendum to the Advanced Guide (Appendix C) that lists all these Design / Text / HTML fields but I often find it quicker to do it as mentioned.

        Norman
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment

        Working...
        X