On Oct 27, 2009, at 2:20 PM, beachbc wrote:
> Thanks Matt, I appreciate the reply!
>
> After reviewing the Default Parameter section of the DRYML manual, I
> don't understand why I wouldn't HAVE to put param="default", however,
> even with all of them removed, the nav section renders perfectly
> fine.  I suppose knowing how Rapid processes the nav section (or any
> other section) would help.   It just seems to me to be a giant magic
> black box; abracadabra.. *poof* you've got ajax, and the two ton
> elephant just disappeared.

Yeah, that feeling doesn't go away. :) Part of the joy of doing stuff  
in Hobo.

param="default" is needed when you're looking to use a tag with  
content inside of it; for instance, I've got a polymorphic main-nav in  
an app I'm working on:

<def tag="main-nav" attrs="current" polymorphic>
   <ul id="MainTabs">
     <set-scoped current-navigation="&current">
       <nav-tab name="home" href="/">Home</nav-tab>
       <do param="default" />
     </set-scoped>
   </ul>
</def>

(the details aren't important here - note the empty <do> block with  
param="default")

Then a particular class of user's nav will look like this:

<def tag="main-nav" for="Guest">
   <main-nav merge>
     <nav-tab name="services" href="/">Services</nav-tab>
     <nav-tab name="rates" href="/">Rates</nav-tab>
     <nav-tab name="register" href="/">Register</nav-tab>
     <nav-tab name="contact" href="/">Contact</nav-tab>
   </main-nav>
</def>

Note that the content inside the <main-nav> call here is inserted  
where the <do param="default" /> tag was in the base tag.

This allows the base main-nav tag to define tabs that should appear on  
everybody's nav, and leaves a space to be filled in.

(Note to Owen: yes, a tutorial on this will be forthcoming, hopefully  
in the next week or so. :)

--Matt Jones

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to