[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Codeigniter concepts aplication flow

Posted on 2014-03-13
7
Medium Priority
?
244 Views
Last Modified: 2014-03-16
I have a login controller tha works just fine much of it from assorted videos I have found on the web.

I would like to have at least three more controllers, product, reporting and my Account.

How do I pass the control to any of these controllers?

I have been looking in CI site at calling controller_2's functions in controller_1, but that isn't what I want to do (and you shouldn't anyway). I want to be able conclude the login controller functionality, launch the product functionality and then the my account functionality back to the product back to the my account and then on to reporting back to product and so on.

Once the user is logged in I am displaying a view with CI and anchors, html href links  redirects remaps, to for example the product controller but I get 404's, an error occurred

I have read (many times) the routes, URL, class and helper detail and I am going round in circles.

Please can anybody help?

Thank you for reading this

John
0
Comment
Question by:johnecollins
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 39925883
You can very well extend the login controller in those 2 controller....
then in the login controller you can extend the base controller (CI_controller)?
0
 

Author Comment

by:johnecollins
ID: 39925938
Loganathan, are you saying that my product class should inherit from my login class?

Or should I write a My_Aplication controller that all controllers, login, product, my account inherit from?

I am sorry to be so obtuse I am trying to write a coherent logical application by yesterday and be able to maintain it too. ;-)
I have seen in the user manual that it is possible to have controllers in different directories so people writing those apps must have the same problem?

Thank you so much for a speedy response it is much appreciated.

John
0
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 39925947
I think, now I understand that you want to inherit multiple parent controllers?
0
Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

 

Author Comment

by:johnecollins
ID: 39926011
Loganathan,

I always think that I have raised my question in a clear and concise manner - failed again ;-).

I think of my controllers as modules within my application, they should cooperate and work together encouraging users to process their requirements with minimum keystrokes, maximum security and confidence that they are getting what they want and what they have paid for.

So I consider that the controllers are all siblings of each other but need to be called to perform their functions as and when required.

I hope that is clearer

Thank you very much

John
0
 
LVL 36

Accepted Solution

by:
Loganathan Natarajan earned 2000 total points
ID: 39928988
Did you see this link from CI forum, http://ellislab.com/forums/viewthread/113288/

I think this way, you can collaborate the controllers.
0
 

Author Closing Comment

by:johnecollins
ID: 39933562
Loganathan,

Thank you very much for your help, shortly after reading the article you forwarded I found codeigniter.tv and videos by Joost van Veen on extending the core, creating MY_Controller and MY_Model classes. This is helping me to progress my development.

Thank you very much

John
0
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 39933572
Glad to help, thanks for your points.
0

Featured Post

Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question