Announcement

Collapse
No announcement yet.

Fragment in a box

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

    Fragment in a box

    Hi Guys.

    http://www.baypressservices.com/acat...-rite_530.html

    If I wanted to put a fragment in a box advertising a special and put it in the space to the left of the components in the above page, how would I go about it?

    Thanks
    Dave
    www.baypressservices.com

    #2
    There's no easy way to do this. It looks like you have some Fragments below the product and you want one to be omitted from this list and to show within a particular product layout.

    A much simple way would be to create a new product level Variable(s) for the special text, image, whatever. Then add some code into your product layout to display these variables if they're not empty. The Starter Guide has a tutorial about this under Adding Custom Fields.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Thanks Norman
      I've got some reading to do.

      Dave
      www.baypressservices.com

      Comment


        #4
        Can you post the product layout code you are using in a code tag?
        Jonathan Chappell
        Website Designer
        SellerDeck Website Designer
        Actinic to SellerDeck upgrades
        Graphicz Limited - www.graphicz.co.uk

        Comment


          #5
          Johnathan
          The product layout used is the V11
          "Standard Layout using CSS"
          It is UnModified.

          Thanks
          Dave
          www.baypressservices.com

          Comment


            #6
            OK So I had five minutes to kill!

            !Important! *** Always take a snapshot before doing anthing to the design of the site. ***

            In Design Library Variables go to Product, right click, new variable:

            Name,prompt and description: SpecialText

            Group and place of setting: Product

            Panel name: General

            Type: Text

            Use Parent Unticked

            Allow empty value: ticked.

            OK

            In design view click on your product and make sure the product layout is in the pane at the bottom.

            Look for the lines:

            Code:
            <div class="product_list">
            		<div class="image_product"><actinic:variable name="ProductImageLayout" /></div>
            			<div>
                     <div style="float: right;">
            In the line: <div class="image_product"><actinic:variable name="ProductImageLayout" /></div> make a carriage return before the </div>
            Code:
            <div style="margin-top: 20px; border:1px solid red; padding:5px;">
            
            
            </div>
            And type some xs

            Code:
            <div style="margin-top: 20px; border:1px solid red; padding:5px;">
            xxxxx
            </div>
            You should see a red box below your product image with xxxx in it.
            Delete the four xs one at a time, when the last is gone start typing SpecialText.
            A prompt box should open and click on the prompt to insert your new variable.

            Your red box is now empty.

            Go to content tree and look towards the bottom of the general pane of your product for SpecialText. Type some words and OK. These words should now be in the red box.

            We can add a couple more style things and limit the width to that of the product image.

            We don't want the box to be there when it is empty so select the whole expression:

            Code:
            <div style="margin-top: 20px; border:1px solid red; padding:5px;font-weight:bold;color:green;width:<actinic:variable name="ProductImageWidth" />;">
            <p><actinic:variable name="SpecialText" /></p>
            </div>
            While the whole expression is highlighted click the Green 'C' at the top of the pane, a box opens (we are making a BlockIf.) In the box click the blue 'V' and select your new variable SpecialText. Then click 'Insert and operator into the expression' and choose 'Is Not Empty'.

            Close the box.

            Code:
            <actinic:block if="%3cactinic%3avariable%20name%3d%22SpecialText%22%20%2f%3e%20%21%3d%20%22%22">
            	
            <div style="margin-top: 20px; border:1px solid red; padding:5px;font-weight:bold;color:green;width:<actinic:variable name="ProductImageWidth" />;">
            <p><actinic:variable name="SpecialText" /></p>
            </div>
            </actinic:block>
            The box will only show when there is text in the Special text prompt in the Product General Pane.

            In the layout pane, if the Actinic Blocks are expanded like here click the green symbol top left of the pane that looks like >< (Or vice versa!)

            Learn more about BlockIfs here:
            http://community.actinic.com/showthread.php?t=35126

            Enjoy!
            Jonathan Chappell
            Website Designer
            SellerDeck Website Designer
            Actinic to SellerDeck upgrades
            Graphicz Limited - www.graphicz.co.uk

            Comment


              #7
              Thank you Johnathan
              Next time you get to California, I owe you lunch.

              Dave
              www.baypressservices.com

              Comment


                #8
                Excellent!
                Jonathan Chappell
                Website Designer
                SellerDeck Website Designer
                Actinic to SellerDeck upgrades
                Graphicz Limited - www.graphicz.co.uk

                Comment

                Working...
                X