Page 1 of 1

How to add an admin page [SOLVED]

Posted: Thu May 10, 2012 2:06 pm
by crosmuller
Hi,

How can I add a page to the cmsms admin module? I need a simple form to insert data into a database that is only available for the website editor.

Thanks

Re: How to add an admin page

Posted: Thu May 10, 2012 3:40 pm
by Wishbone
Can you give more details and examples of what you're trying to do?

Many modules, such as CompanyDirectory and Products allow you to customize a form, and allow you to add/edit/delete data and present them on the front end.

Re: How to add an admin page

Posted: Fri May 11, 2012 6:23 am
by crosmuller
Hi, thanks for the response. I would like to place a product order form on the frontend. The products on the form are extracted from a mysql table. I already built the frontend form with a user defined tag. The problem is I want the website editor to add and delete products at the backend but I have no idea how to add a page to the cmsms admin part. I am familiar with formbuilder but it is not building a form that's the issue, but how to add a custom page to the backend. I hope I explained it clearly.

Sorry I just read your post again and you did not mention form builder but Products, I would prefer to add my own custom page instead of using a plugin. Products looks ok but it has a lot of extra functionality I don't really need.

Re: How to add an admin page

Posted: Fri May 11, 2012 11:32 am
by Jos
crosmuller wrote:I would prefer to add my own custom page instead of using a plugin. Products looks ok but it has a lot of extra functionality I don't really need.
By doing this your own way, I think you're making it more difficult than necessary. not just for now, but think about upgradingprocesses too.
Very often modules/plugins can do more than you need. The other way around would be really a problem ;)

Re: How to add an admin page

Posted: Fri May 11, 2012 12:14 pm
by mcDavid
You want to make a module instead of a UDT.

Don't worry it's not much harder. Start off with the skeleton module and take a good look at other modules and the module api http://www.cmsmadesimple.org/apidoc/

Re: How to add an admin page

Posted: Fri May 11, 2012 12:23 pm
by crosmuller
great thanks. I'll have a look at the skeleton module. Jos I see your point but what if I want to do something like this and there is no plugin that I can use? Also my UDT is really simple I don't think it will break that easily.

Re: How to add an admin page

Posted: Fri May 11, 2012 3:37 pm
by Wishbone
Before I really understood CMSMS I wrote my own custom modules for everything.. Now I hardly ever do.. What does Products have that you don't want? What is it missing that you do? You can add fields, change names of fields and even remove fields you don't want, all without hacking the code.

There's also the ListIt2 module that has no default fields... You add all the fields that you need. I haven't had to write a custom module for a one-off purpose in a couple of years now.

Re: How to add an admin page

Posted: Wed Jun 20, 2012 2:14 pm
by crosmuller
Thank you wishbone listit sounds interesting. I ended up using products for the backend and a user defined tag for the frontend:

http://www.vanpollscatering.nl/index.ph ... estellijst

The layout still needs some work.