# |
Aug 8th 2008, 23:38 |
M4ngoB00M |
tx |
# |
Aug 8th 2008, 23:38 |
M4ngoB00M |
yeah - i have a mental block on regex. |
# |
Aug 8th 2008, 23:38 |
markstory |
M4ngoB00M: that would work. outside of a complicated regex |
# |
Aug 8th 2008, 23:38 |
M4ngoB00M |
withou defining a regex or custome validator? |
# |
Aug 8th 2008, 23:37 |
markstory |
Veracious: $model->find('list'); |
# |
Aug 8th 2008, 23:37 |
M4ngoB00M |
markstory: check this out: http://bin.cakephp.org/saved/35922 is this the best way to validate a field like an "address 1st line" |
# |
Aug 8th 2008, 23:37 |
paramS |
I am now thinking , that a helper might come handy in creating menu system. Define all the Menu and Sub-Menus in my helper and then from each controller function just pass which Menu and Sub-Menu is "active" ( for theming ) |
# |
Aug 8th 2008, 23:37 |
Veracious |
is there an in-built way at the moment to get enums from a mysql table field in cakephp? I found one solution but it dates back to late 2006 |
# |
Aug 8th 2008, 23:37 |
markstory |
see line 260 of dispatcher.php |
# |
Aug 8th 2008, 23:36 |
markstory |
freebox: sorry I just looked at dispatcher. and the controller's output comes back as the requestAction. |
# |
Aug 8th 2008, 23:35 |
paramS |
cool, lemme try that for navigation stuff .. thanks for the info |
# |
Aug 8th 2008, 23:35 |
markstory |
freebox: try return $categories; see if that works. |
# |
Aug 8th 2008, 23:35 |
markstory |
paramS: yeah $this->set('navigation', $stuff) in your controller. |
# |
Aug 8th 2008, 23:34 |
markstory |
(in 1.1) |
# |
Aug 8th 2008, 23:34 |
markstory |
at least it did the last time I used it. |
# |
Aug 8th 2008, 23:34 |
paramS |
markstory << can i define a variable which can then be used in layout/default.ctp ; i want to export $navigation , separate from $content_for_layout |
# |
Aug 8th 2008, 23:34 |
markstory |
not the set vars. |
# |
Aug 8th 2008, 23:34 |
markstory |
requestAction takes the __return__ of the controller action. |
# |
Aug 8th 2008, 23:34 |
freebox |
¬¬ |
# |
Aug 8th 2008, 23:33 |
markstory |
fail. |
# |
Aug 8th 2008, 23:33 |
freebox |
markstory: the action: $this->set('cats', $this->Categoria->find('all')); |
# |
Aug 8th 2008, 23:33 |
markstory |
freebox: so return $categories; |
# |
Aug 8th 2008, 23:33 |
markstory |
Veracious: no prob :) |
# |
Aug 8th 2008, 23:33 |
freebox |
return my categories |
# |
Aug 8th 2008, 23:33 |
markstory |
or just set vars? |
# |
Aug 8th 2008, 23:33 |
freebox |
markstory: yes |
# |
Aug 8th 2008, 23:33 |
markstory |
freebox: does your controller action return anything? |
# |
Aug 8th 2008, 23:33 |
freebox |
its because im using it in home.ctp? |
# |
Aug 8th 2008, 23:33 |
Veracious |
markstory: thanks so much! =) |
# |
Aug 8th 2008, 23:32 |
freebox |
but my element dosent work |
# |
Aug 8th 2008, 23:32 |
freebox |
and worked |
# |
Aug 8th 2008, 23:32 |
markstory |
paramS: not the easiest option but it works. |
# |
Aug 8th 2008, 23:32 |
freebox |
i've created an view to the action menu |
# |
Aug 8th 2008, 23:32 |
freebox |
dosent work this element! XD |
# |
Aug 8th 2008, 23:32 |
paramS |
i like the sound of ACL option... |
# |
Aug 8th 2008, 23:31 |
markstory |
paramS: not sure but google might know. |
# |
Aug 8th 2008, 23:31 |
freebox |
lol |
# |
Aug 8th 2008, 23:31 |
paramS |
is there any article about common ways of making navigation system in Bakery or any Cake related blog ; this should be a very common problem that must have been solved ;) |
# |
Aug 8th 2008, 23:30 |
markstory |
if you are using ACL there are ways of making menus off of an Acl that is filled with controllers/actions as well. |
# |
Aug 8th 2008, 23:30 |
paramS |
i just dont want to hard-code the navigation links anywhere in my application as i am sure they will change all the time |
# |
Aug 8th 2008, 23:29 |
markstory |
well you could make a menu model/controller and use treebehavior to help nest them. |