Guidence for your MVC structure to build new functionality

Support for coding, modules or other software issues
Post Reply
rawalprashant
Posts: 4
Joined: Mon Oct 15, 2012 12:54 pm

Guidence for your MVC structure to build new functionality

Post by rawalprashant » Mon Oct 15, 2012 1:18 pm

Hi brent and leo

i want to know your MVC structure to build my own functionality in CMS

can you give some idea or brief

my concept is to add menu with submenu CMS->pages

2 fields are there title and content so i want to do CRUD in admin and display that content at front

please give me such kind of coding information to do more work for you

i will donate all my functionality to make your CMS more functionaly as people suggestion as free of cost

waiting for your response

thanks
Prashant

User avatar
Brent
Site Admin
Posts: 4459
Joined: Sat Dec 12, 2009 3:35 pm
Location: Canada eh

Re: Guidence for your MVC structure to build new functionali

Post by Brent » Mon Oct 15, 2012 1:55 pm

I'm not sure I understand what you want to do.
Could you explain in a little more detail.

rawalprashant
Posts: 4
Joined: Mon Oct 15, 2012 12:54 pm

Re: Guidence for your MVC structure to build new functionali

Post by rawalprashant » Tue Oct 16, 2012 12:21 am

Yes sure

i want to create new menu call CMS with submenu pages

when admin can click on pages he can able to fill form which have 2 fileds title and content

i want functionality add update delete and save with this new concept

and also want the content will be show at front end

so what necessory files i want to create and how i complete this at myside

i hope you getting me

thanks
prashant

User avatar
Brent
Site Admin
Posts: 4459
Joined: Sat Dec 12, 2009 3:35 pm
Location: Canada eh

Re: Guidence for your MVC structure to build new functionali

Post by Brent » Tue Oct 16, 2012 4:24 am

We think what you want is something like the Home Page Module. Have a look at that in admin.
Image Display is also similar, but only displays images.
You can get the basic functionality from these 2 modules and probably combine that Home Page text handling with the locate ability of Image Display Module.
After creating the Admin side, and making an entry, You would just include in the Template manager. You would also have to add information in the Template Manager for the new CMS controller.
You would then create the catalog files to actually display this content, again using the Home Page module and or the Image Display module for examples.
The home page module is designed to be only shown on the home page. The image display can be used on any page and in many locations on the page.

rawalprashant
Posts: 4
Joined: Mon Oct 15, 2012 12:54 pm

Re: Guidence for your MVC structure to build new functionali

Post by rawalprashant » Sat Oct 20, 2012 6:08 am

Hi

thanks for your response at every time

if you create one of development guide with small example and share with us..thats very better for developers

well todays my problem is i am updating my cms page but its not updated in database

can you guide me how can i check the update query is right or wrong with assign parameters?

function update_static_page(){
$sql = "update cms set cms_title = '?', cms_content = '?', date_modified = now() where cms_id = '?'";
$this->database->query($this->database->parse($sql, $this->request->gethtml('cms_title', 'post'), $this->request->gethtml('cms_content', 'post'), $this->request->gethtml('cms_id')));
}

is my function in model


thanks again
prashant

User avatar
leo
admin
Posts: 4320
Joined: Sun Dec 13, 2009 8:27 am
Location: Hungary

Re: Guidence for your MVC structure to build new functionali

Post by leo » Sat Oct 20, 2012 9:45 am

Please, share with us the structure of your cms table as well.

rawalprashant
Posts: 4
Joined: Mon Oct 15, 2012 12:54 pm

Re: Guidence for your MVC structure to build new functionali

Post by rawalprashant » Sat Oct 20, 2012 10:14 am

Hi

Thanks that issue is resolved now tell me how can i get path of image

i have tried to give manual path like c:/wamp/alegrocart/image/

but its not working

one more question can i call more than one model in controller?

thanks
prashant

User avatar
Brent
Site Admin
Posts: 4459
Joined: Sat Dec 12, 2009 3:35 pm
Location: Canada eh

Re: Guidence for your MVC structure to build new functionali

Post by Brent » Sat Oct 20, 2012 3:59 pm

You you show the code how you are trying to access the image?
You might just try /image/.
Yes, you can reference more than one model. Look at the catalog/controller/category.
both model_products and model_category are referenced.

Post Reply