php - CakePHP : Multiple views from One Controller -


i working in cakephp 1st time. need create multiple views single controller.
eg: have settings table.

schema of settings table

1.id
2.name
3.type

i have created model , controller using cake bake. have multiple views data goes settings table. data of designations, departments, qualifications, projects , many other things go type field of settings table names entered.

so when m creating model , controller thru cake bake creating view per settings table, whereas need view pages per types, i.e create designation, create departments, create projects , view, edit , delete files them.

pls me find way achieve that..

you can add views creating .ctp file in respective views folder (views/"modelname"/add_department.ctp)

in "modelname" controller add

function adddepartment() {     // logic here } 

but if want set type, can create normal add.ctp , create selectbox different possible types.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

java - More than one row with the given identifier was found: 1, for class: com.model.Diagnosis -