howto.txt 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. And here's a quick tutorial for the testers. The following is how you would convert the popular Mollio Menu template menus with Wayfinder. I think you'll see how much easier it will be to create dynamic, nested menus compared to DropMenu. This is totally untested, but it should work...
  2. First, reference this [url=http://www.mollio.org/typeC.html]example page[/url]. Nice eh?
  3. For reference, here's the Menu Code:
  4. [code]<ul id="nav">
  5. <li class="first"><a href="#">Home</a></li>
  6. <li class="active"><a href="#">Products</a>
  7. <ul>
  8. <li class="first"><a href="#">Maecenas</a></li>
  9. <li class="active"><a href="#">Phasellus</a></li>
  10. <li><a href="#">Mauris sollicitudin</a></li>
  11. <li><a href="#">Mauris sollicitudin</a></li>
  12. <li><a href="#">Mauris sollicitudin</a></li>
  13. <li><a href="#">Mauris sollicitudin</a></li>
  14. <li class="last"><a href="#">Mauris at enim</a></li>
  15. </ul>
  16. </li>
  17. <li><a href="#">Client list</a>
  18. <ul>
  19. <li class="first"><a href="#">Maecenas</a></li>
  20. <li><a href="#">Phasellus</a></li>
  21. <li><a href="#">Mauris sollicitudin</a></li>
  22. <li class="last"><a href="#">Mauris at enim</a></li>
  23. </ul>
  24. </li>
  25. <li><a href="#">Case Studies &amp; References</a>
  26. <ul>
  27. <li class="first"><a href="#">Maecenas</a></li>
  28. <li><a href="#">Phasellus</a></li>
  29. <li><a href="#">Mauris sollicitudin</a></li>
  30. <li><a href="#">Phasellus</a></li>
  31. <li><a href="#">Mauris sollicitudin</a></li>
  32. <li><a href="#">Phasellus</a></li>
  33. <li><a href="#">Mauris sollicitudin</a></li>
  34. <li><a href="#">Phasellus</a></li>
  35. <li><a href="#">Mauris sollicitudin</a></li>
  36. <li><a href="#">Phasellus</a></li>
  37. <li><a href="#">Mauris sollicitudin</a></li>
  38. <li class="last"><a href="#">Mauris at enim</a></li>
  39. </ul>
  40. </li>
  41. <li class="last"><a href="#">Locations</a>
  42. <ul>
  43. <li class="first"><a href="#">Maecenas</a></li>
  44. <li><a href="#">Phasellus</a></li>
  45. <li><a href="#">Mauris sollicitudin</a></li>
  46. <li class="last"><a href="#">Mauris at enim</a></li>
  47. </ul>
  48. </li>
  49. </ul>[/code]
  50. Your example call:
  51. [code][[Wayfinder? &startId=`0` &level=`2` &outerTpl=`wfOuter` &innerTpl=`wfInner` &rowTpl=`wfRow` &hereClass=`active` &firstClass=`first` &lastClass=`last`]][/code]
  52. Your outer template – [b]{{wfOuter}}[/b] :
  53. [code]<ul id="nav">
  54. [+wf.wrapper+]
  55. </ul>[/code]
  56. Your inner template – [b]{{wfInner}}[/b] :
  57. [code]<ul>
  58. [+wf.wrapper+]
  59. </ul>[/code]
  60. Your row template – [b]{{wfRow}}[/b] :
  61. [code]<li[+wf.classes+]><a href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a>[+wf.wrapper+]</li>[/code]
  62. Add the following CSS to your template:
  63. [code]<style type="text/css">
  64. /*
  65. LEGAL
  66. =====
  67. Copyright: Daemon Pty Limited 2006, http://www.daemon.com.au
  68. Community: Mollio http://www.mollio.org $
  69. License: Released Under the "Common Public License 1.0",
  70. http://www.opensource.org/licenses/cpl.php
  71. License: Released Under the "Creative Commons License",
  72. http://creativecommons.org/licenses/by/2.5/
  73. License: Released Under the "GNU Creative Commons License",
  74. http://creativecommons.org/licenses/GPL/2.0/
  75. */
  76. /* NAV - top horizontal nav */
  77. #nav, #nav ul {padding: 0;margin: 0;list-style: none}
  78. #nav {font-weight:bold;height:2.09em;font: bold 96% arial;margin: 0 105px 0 40px}
  79. #nav li {position:relative;background: #999;float: left;width: 10em;display:block;margin: 0;border-bottom: 3px solid #666;border-right: 3px solid #252525;padding:0}
  80. #nav a, #nav a:link, #nav a:visited, #nav a:hover, #nav a:active {text-decoration:none;cursor:pointer;color:#fff;display: block;padding: 4px 10px 2px}
  81. #nav a:hover {color:#000}
  82. #nav li ul {border-left: 1px solid #c00;background: #f6f6f6 url("assets/images/featurebox_bg.gif") no-repeat 100% 100%;width:15.8em;font-size:90%;margin-top:3px;position: absolute;font-weight:normal;left: -999em}
  83. #nav li:hover ul, #nav li.sfhover ul {left: 0;z-index:99999}
  84. #nav li li {background:none;float:none;border:none;border: 1px solid #999;border-top:1px solid #fff;border-right:none;border-left:none;padding-left:0}
  85. #nav li li.last {border-bottom:none}
  86. #nav li li a, #nav li li a:link, #nav li li a:visited, #nav li li a:hover {color:#000;padding: 3px 10px 2px;width:14em}
  87. #nav li li a:hover {color:#fff;background:#c00}
  88. #nav li.active {background: #c00;border-bottom: 3px solid #c00}
  89. #nav li.active ul {border:none;background: #c00 url("assets/images/featurebox2_bg.gif") no-repeat 100% 100%}
  90. #nav li.active a:link, #nav li.active a:visited, #nav li.active a:hover, #nav li.active a:active {}
  91. #nav li.active a:hover {color:#000}
  92. #nav li.active li {border:none;border-top: 1px solid #c15c5c;border-bottom: 1px solid #870000}
  93. #nav li.active li.last {border-bottom: none}
  94. #nav li.active li a:link, #nav li.active li a:visited, #nav li.active li a:hover, #nav li.active li a:active {color:#fff}
  95. #nav li.active li a:hover {background: #666 url("assets/images/sprites.gif") repeat-x 0 99%;color:#fff}
  96. #nav li.active li.active a:link, #nav li.active li.active a:visited, #nav li.active li.active a:hover, #nav li.active li.active a:active {color:#fff;font-weight:bold;background: #666 url("images/sprites.gif") repeat-x 0 99%}
  97. <style>[/code]
  98. And finally, add the following three attached images to your [b]assets/images/[/b] folders and it should work just fine. :)