Re: [Radiant] Drop down menus?

2008-05-27 Thread [EMAIL PROTECTED]
On Tue, 2008-05-27 at 10:20 -0500, Sean Cribbs wrote:
 Nate,
 
 It depends on how you want to generate those menus.  r:navigation is 
 best for single list navigation menus that have highlighting, not nested 
 menus.  However, assuming you'll be generating the navigation from the 
 page structure, you could do something like this:
 
 r:find url=/
 ul
 r:children:each
   lir:link/
 r:if_children
 ul
   r:children:eachlir:link //li/r:children:each
 /ul
 /r:if_children/li
 /r:children:each
 /ul
 /r:find
 
 That will generate a list based on the homepage's children and 
 grandchildren pages.

OMG! Are you kidding me? It's that easy? I am really loving the switch
to Radiant.

One question though, I am using r:navigation to show the current page
with :here and :selected methods(?), so how would this work with the
markup you described?


~Nate

___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Drop down menus?

2008-05-27 Thread Anton Aylward
Given that nested list, there are a number of sites that show how to do
the 'suckerfish' pull-downs using ONLY CSS.

Sean Cribbs said the following on 27/05/08 11:20 AM:
 Nate,
 
 It depends on how you want to generate those menus.  r:navigation is 
 best for single list navigation menus that have highlighting, not nested 
 menus.  However, assuming you'll be generating the navigation from the 
 page structure, you could do something like this:
 
 r:find url=/
 ul
 r:children:each
   lir:link/
 r:if_children
 ul
   r:children:eachlir:link //li/r:children:each
 /ul
 /r:if_children/li
 /r:children:each
 /ul
 /r:find
 
 That will generate a list based on the homepage's children and 
 grandchildren pages.
 
 Sean
 
 [EMAIL PROTECTED] wrote:
 I am new to Radiant and using radiant tags, and I am having trouble
 finding a solution for drop-down menus using r:navigation. What I want
 to do is this, similar to the suckerfish dropdowns from alistapart.com
 (http://www.alistapart.com/articles/dropdowns) :

 ul
  liMenu Item 1/li
  ul
  ?liSub Menu Item 1/li
  ?liSub Menu Item 2/li
  ?liSub Menu Item 3/li
  /ul
  ?liMenu Item 2/li
  ?liMenu Item 3/li
 /ul

 Are there any facilities for this in r:navigation or do I need to cobble
 this together by hand? Thanks in advance.


-- 
Many of life's failures are people who did not realize how close they
were to success when they gave up.
Thomas A. Edison
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Drop down menus?

2008-05-27 Thread Marty Haught
 Well, only css and a little javascript. My query was about finding the
 most Radiant way to do it. Sean's solution got me through the list
 generating part, now it's up to me for the styling. I am aware of the
 various 'suckerfish' implementations. What I am not familiar with is the
 radius way to auto-generate the site structure.

Nate, Sean's pointer on the if_self and if_self_or_ancestor tags is
key.  I have built site map snippets as well as dynamic navigation
with these. The other possible trick is you can use clever 'opt out'
page parts that can remove unwanted pages from this menu.  Such as :

r:unless_content part=no-nav
  lir:link /r:if_ancestor_or_self...
/r:unless_content 

In this example any page with a no-nav page part will be ignored.  You
can add these at the top level for things that you don't want to
appear in your menu but still be visible in other spaces.  You can
then make a sub-nav snippet that continues to refer to itself so that
you can nest down many levels.  Hopefully that gives you enough to go
on.

Cheers,
Marty
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Drop down menus?

2008-05-27 Thread Chris Parrish

Anton Aylward wrote:

There __ARE__ pure CSS pull-downs.
  


Anton, I couldn't get to the link you provided so just in case I wanted 
to make sure you and others were aware that you do need a bit of 
javascript with suckerfish menus if you plan to support IE 6 or lower 
(they only support the pseudo classes (like :hover) on a tags so you 
can have javascript add attributes to your DOM so the older IE's can 
play along).


If your requirements are only for newer browsers, then you can get by 
with true css-only drop down menus.


-Chris


I've always preferred them to the javascript ones for a  variety of
reasons, not least of which is that the ones I've used (go google) are
portable across browsers and work when javascript is turned off, as many
people do thinking that this makes them immune to things like XSS.


Her, for example, is a CSS generator with which you can even customize
the CSS

http://pixopoint.com/suckerfish_css/

  


___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant