Announcement

Collapse
No announcement yet.

Top level section with subsections link change

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

    Top level section with subsections link change

    Can anyone think of a block if condition that changes a link for a top level section if the top level has subsections? Something to this effect...

    <a href="
    block if
    javascript:void(0);
    /block if

    block if
    catalog_url.html
    /block if
    ">

    If there are subsections then the url will be <a href="javascript:void(0);">

    If there are no subsections then the url will be <a href="catalog_url.html">

    #2
    Try using the variable SectionLevel ... check out the site map for an example on its usage.


    Bikster
    SellerDeck Designs and Responsive Themes

    Comment


      #3
      PHP perhaps
      Code:
      <actinic:block php="true">
        $haschildren = false;
      </actinic:block>
      
      <actinic:block type="ChildSectionList">
        <actinic:block php="true">
          $haschildren = true;
        </actinic:block>
      </actinic:block>
      
      <actinic:block php="true">
        if ( $haschildren )
          {
          echo "withchildstuff";
          }
        else
          {
          echo "nochildstuff";
          }
      </actinic:block>
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Originally posted by NormanRouxel
        PHP perhaps
        That works perfectly, thanks Norman.

        Comment

        Working...
        X