Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge a grocery crud application into cms #43

Closed
davidoster opened this issue Dec 11, 2012 · 4 comments
Closed

merge a grocery crud application into cms #43

davidoster opened this issue Dec 11, 2012 · 4 comments

Comments

@davidoster
Copy link
Contributor

I have a grocery crud application with each own MySQL db.
How can I merge this into NO-CMS?

Shall I make a module?
What is exactly the procedure in order to successfully merge it?

@goFrendiAsgard
Copy link
Owner

Yes, you should make a module.
It can simply done by make a directory in /modules/ (let's say you want to make gc_app, then it should be /modules/gc_app)
Next you need to put all of your models, views and controllers in that directory.
You will probably need some adjustment, especially on some external css and javascript link.

If you want your pages to be integrated with No-CMS itself, you will need to make a new navigation (Complete Menu | CMS Management | Navigation Management).Fill out the url (e.g: "gc_app/my_controller/my_function") and the navigation code (e.g: gc_app_my_page)
And in your controller, do this:

$this->view('my_view', $data, 'my_page'); // my_page is corresponding navigation code

instead of

$this->load->view('my_view', $data);

That's all

@davidoster
Copy link
Contributor Author

Thank you very much!
It is very clear and simple. That's what I was thinking of.
I suppose, since I will be using a different db for the gc app I will need to do something like this within my controller,

$this->load->database($my_config);

right?

@goFrendiAsgard
Copy link
Owner

exactly :)

@davidoster
Copy link
Contributor Author

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants