On 10/24/09 15:20, Leslie P. Polzer wrote:
> On Oct 24, 4:42 pm, Rayservers <[email protected]> wrote:
>> Its the weekend again and I'm grokking lisp. Is there a quick example 
>> somewhere
>> on using the navigation widget to create deeper menus:
> 
> You just nest navigation widgets, for example:
> 
> (make-navigation "First level"
>   "Second level" (make-navigation "Second level" ...))
> 
> For the actual appearance you need to modify the menu CSS (or the way
> your
> navigation widget is rendered into HTML, but I don't recommend that).

I had guessed as much, but I must have messed up the syntax. Lets see...

Coolness. Now I can port the blog. Here is the trivial code for those that come
upon this via google...

(weblocks:defwebapp globalisles.net :prefix "/")

(defun init-user-session (comp)
  (setf (weblocks:composite-widgets comp)
        (make-main-page)))

;; --------------------------------------------------------------


;; Main page is the navigation with children


;; --------------------------------------------------------------


(defun make-main-page ()
  (make-navigation 'navigation
                   'main (make-main-widget)
                   'blog (make-navigation 'blog
                                          'cat1 (make-cat1-widget)
                                          'cat2 (make-cat2-widget))
                   'admin (make-admin-widget)))


;; --------------------------------------------------------------


;; Stubs for test


;; --------------------------------------------------------------



(defun make-blog-widget ()
"Hello blog2")

(defun make-main-widget ()
"home page")

(defun make-admin-widget ()
"123")


(defun make-cat1-widget ()
"cat1")

(defun make-cat2-widget ()
"cat2")

Now, on to CSS.

A CMS for these Global Isles...

Cheers,

---Venkat.

http://www.rayservers.com/

> 
>   Leslie
> > 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"weblocks" 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/weblocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to