Skip to end of metadata
Go to start of metadata

I am building a left hand navigation menu based off of one found at cssplay. I started creating custom user macros but that ended quickly because of limitations.

Example desired menu HTML:

<div class="customMenu">
  <ul>
    <li><a class="hide" href="#">FAVORITES</a>
    <!--[if lte IE 6]><a href="#">FAVORITES<table><tr><td><![endif]-->
    <ul>
      <li><a href="#">REMOVE FAVORITE</a></li>
      <li><a href="#">ADD FAVORITE</a></li>
      <li><a class="hide" href="#">PAGES &gt;</a>
      <!--[if lte IE 6]><a class="sub" href="#" >PAGES &gt;<table><tr><td><![endif]-->
      <ul>
        <li><a href="#">PAGE 1</a></li>
      </ul>
      <!--[if lte IE 6]></td></tr></table></a><![endif]-->
      </li>
    </ul>
    <!--[if lte IE 6]></td></tr></table></a><![endif]-->
    </li>
    <li><a href="#">PREFERENCES</a></li>
  </ul>
</div>

I would be okay if I could have the menulink macro ONLY return the HREF. I would be eager to use velocity, and I have even read a lot of the documentation. But I find it extremely useless because how am I supposed to use any of the objects or methods if there isn't a list of them anywhere? Download the source code and blindly rifle through?

Help appreciated,
Frustrated user

  • No labels

4 Comments

  1. Unknown User (gfraser)

    I've spent quite a lot of time looking at the CSS Play menus and they don't work too well in Confluence - there's herds of CSS that gets spewed out by Confluence and it causes problems with some of the cssplay stuff so you'll need to do more than just hack around the HTML, you'll need to do a fair bit of work on the CSS as well depending on which of their menus you are looking to use.

    What attribs in the menulink macro output are causing you problems?

    1. Unknown User (rn)

      The menu surprisingly worked without hiccups when I created a custom user macro that spit out the example menu that I am trying to use. The only problem comes when I try to use the menulink destinations within the menu shell I have provided above.

      I created three macros: list, list-item, list-sub-item

      list:

      <div class="customMenu">
        <ul>
          $body
        </ul>
      </div>

      list-item:

      <li><a href="$body">$param0</a></li>

      list-sub-item:

      <a class="hide" href="$body">$param0</a>
          <!--[if lte IE 6]><a href="$body">$param0<table><tr><td><![endif]-->

      The problem comes from not knowing how to pick and choose where a new macro starts, and how to interpret the body's. If I could resolve a menulink destination without the surround a tags and such, I could use my list-sub-item macro without a problem. Even better would be if I were able to pass in macros that possess a body as parameters to my custom macros. I tried this but they didn't interpret.

      In all, I think my approach is wrong. Is there an easier way to write a template using builder? I just want to write the HTML and CSS myself and be able to pick and choose when I need particular things like the destination of a menulink macro pointing to the favourites. I don't need the anchor tags written for me nor can I construct anything that isn't extremely verbose and convoluted. Macros are great for users, but they really annoy anyone (or maybe just me...) trying to develop a theme.

      1. Unknown User (gfraser)

        So you want us to write the macros for you? Or are you writing them yourself? I'm confused.

  2. Unknown User (rn)

    I can handle it if the menulink macro had an alternative. This line is impossible given the menulink macro's output:

    <!--[if lte IE 6]><a href="#">FAVORITES<table><tr><td><![endif]-->