Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » LinkingMode help needed......

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1 2
Go to End
Author Topic: 4593 Views
  • Adamski
    Avatar
    Community Member
    14 Posts

    Re: LinkingMode help needed...... Link to this post

    me again.... heh. Having a great conversation with myself today....

    anyway, I sorted it out and thought i'd put my solution up here in case anyone else has the same problems....

       <ul>
          <% control Menu(1) %>
          <li><a href="$Link" title="Go to the $Title.XML page" class="$LinkOrSection, $LinkingMode">$MenuTitle</a>
          <% if LinkOrSection = section %>
          <% if Children %>
          <div id="leftbox_sub">
          <ul>
          <% control Children %>
          <li><a href="$Link" title="Go to the $Title.XML page" class="$LinkOrSection, $LinkingMode">$MenuTitle</a>
          <% if LinkOrSection = section %>
          <% if Children %>
          <div id="leftbox_sub2">
          <ul>
          <% control Children %>
          <li><a href="$Link" title="Go to the $Title.XML page" class="$LinkOrSection, $LinkingMode">$MenuTitle</a>
          <% if LinkOrSection = section %>
          <% if Children %>
          <div id="leftbox_sub3">
          <ul>
          <% control Children %>
          <li><a href="$Link" title="Go to the $Title.XML page" class="$LinkOrSection, $LinkingMode">$MenuTitle</a>
          </li>
          <% end_control %>
          </ul>
          </div>
          <% end_if %>
          <% end_if %>
          </li>
          <% end_control %>
          </ul>
          </div>
          <% end_if %>
          <% end_if %>
          </li>
          <% end_control %>
          </ul>
          </div>
          <% end_if %>
          <% end_if %>
          </li>
          <% end_control %>
       </ul>

  • Stefan
    Avatar
    Community Member
    5 Posts

    Re: LinkingMode help needed...... Link to this post

    Why don't you do it with just CSS instead? No need for all the complex structure.

    Just nest your <ul><li>... <ul><li>... </li></ul>... </li></ul>

    I'm not sure if this would work but: Then apply CSS:

    ul li { color: black; }
    ul li ul li { color: red; }
    ul li ul li ul li { color: blue: }

    or just apply CSS like:

    #leftsubbox li { color: black; }
    #leftsubbox2 li { color: red; }

    etc

    Hope this helps!

    4593 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.