Tuesday, February 2, 2010

RE: Navigation Controller

I thought about this. Contacts I am making a controller since it usually has
a contact form of some sort. But my only problem is passing the site to a
non tech and having them type in urls. Its easy for "us" since we tend to
know what does what but someone who has no clue might not understand
something that's simple to us.

Will keep playing around with ideas in my head.

Maybe a select field to choose a list of possible pages created in the db.
So they have to create the "page" first then in menu manager create new link
and link to it based on the page "link name" (contact us) save the link name
in the db inflector contact_us.... I don't know

Sound good?

-----Original Message-----
From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of John Andersen
Sent: February-02-10 10:54 AM
To: CakePHP
Subject: Re: Navigation Controller

With regard to your navigation system :) I would attach two additional
fields to store the url and title.

menues
+ id
+ lft
+ rght
+ parent_id
+ title
- url

So in your "Contact us" case, you would add a node with the title "Contact
us" and the url as "/contacts/us" (ok, funny to have a contacts controller,
probably should be the pages controller).

If the url is not specified, then the node is just a label without the
hyperlink.

Does this help you or have you already thought about this?
Enjoy,
John

On Feb 1, 11:10 pm, "Dave" <make.cake.b...@gmail.com> wrote:
> I would like to build a navigation system where the admin can modify
> menus dynamically. I need a top , left, right, footer navigation. So i
> made my navigation controller/model with tree behaviour. So those 4
> menus are in there, add sections within them. But cant seem to come up
> with the best way to mange the links/pages for each. User adds a new
> link called contact us for example. How to set it so contact us goes
> to contact controller? Easy to say type in slug "/contact" but if the
> end admin user is a complete moron you cant trust that they wont type in
"contact us" and then goes no where.
>
> And how would I build the navigations and save them...i mean no need
> to build the footer/top nav on every page view, since they wont change
> from page to page. What is the best way to get the data to build the
> menus and save them so your not requesting buildTopNav() buildFooterNav()
type thing.
>
> Any ideas? Pointers?
>
> Thanks.
>
> Dave

Check out the new CakePHP Questions site http://cakeqs.org and help others
with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com To
unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group
cake-php+at http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: