Announcement

Collapse
No announcement yet.

Equal section link widths

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

    Equal section link widths

    In a standard sub section list layout the column count is <actinic:variable name="SectionLinkColumnCount" />, each column is preceded by <td valign="top">

    Thus far if I want three columns of equal width I have to replace <actinic:variable name="SectionLinkColumnCount" /> with figure 3 and put <td valign="top" width="33%">

    If I want two columns of equal width I have to replace <actinic:variable name="SectionLinkColumnCount" /> with figure 2 and put <td valign="top" width="50%">

    and so forth...

    Is there some wizardry that will convert <actinic:variable name="SectionLinkColumnCount" /> into the respective percentage width for the <td> ?

    There is something from Norman in a similar vein relating to brochure fragments in columns (http://community.sellerdeck.com/showthread.php?t=6040).

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

    #2
    You could use Javascript. A different method is blockifs for widths in the td.
    Peblaco

    Comment


      #3
      Thanks Louise. That's probably the best. I'm still hoping a JavaScript wiz might chip in!
      Jonathan Chappell
      Website Designer
      SellerDeck Website Designer
      Actinic to SellerDeck upgrades
      Graphicz Limited - www.graphicz.co.uk

      Comment


        #4
        Code:
        <actinic:block php="true">echo floor(100 / <actinic:variable name="SectionLinkColumnCount" selectable="false" />);</actinic:block>
        Will return 25, 33, 50 or 100 depending on whether SectionLinkColumnCount is 4, 3, 2 or 1 respectively. And work for all other values too.

        And, of course, you could do it without PHP using a bundle if BlockIf's; one for each expected value as Louise suggests.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          Wondrous! Thank you Norman.

          Open layout code Standard Sub Section List and click 'Click here to edit list'

          Change the several instances of <td valign="top"> to:
          Code:
          <td valign="top" width="<actinic:block php="true">echo floor(100 / <actinic:variable name="SectionLinkColumnCount" selectable="false" />);</actinic:block>%">
          Here is a screenshot:

          Last edited by graphicz; 27-Jul-2012, 12:03 PM. Reason: Additional info:
          Jonathan Chappell
          Website Designer
          SellerDeck Website Designer
          Actinic to SellerDeck upgrades
          Graphicz Limited - www.graphicz.co.uk

          Comment

          Working...
          X