Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: How to set global layout data?
Post: RE: How to set global layout data?

Thank for the reply. I looked closer at how templates are rendered in the View class of CI4 and decided not to use them at all. Instead I just render views. In order to pass common data to views lik...
1,661 Views
2 Replies
10-28-2021, 12:08 PM
forumz
    Thread: How to set global layout data?
Post: How to set global layout data?

Is there a way to set layout data in a controller, so that the data is available every time when the layout is rendered? CodeIgniter 3 had this functionality available and it worked well. The new lay...
1,661 Views
2 Replies
10-27-2021, 05:32 PM
forumz
    Thread: Global view variables
Post: RE: Global view variables

Is there a way to pass a variable to a template once for all the routeable methods in a controller? I'm pretty sure there was in CI3 and I also had one in Kohana. Just can't find anything in CI4 docum...
2,101 Views
3 Replies
07-05-2021, 03:37 AM
forumz
    Thread: Global view variables
Post: Global view variables

If I'm not mistaken in CodeIgniter 4 there was a method for setting variables to be available to all views.  Is it possible to do the same in CI4? An example of what I want to achieve is: I have a l...
2,101 Views
3 Replies
07-04-2021, 03:02 PM
forumz
    Thread: Registering custom validation methods in a module
Post: RE: Registering custom validation methods in a mod...

I looked how Validation object is created. If instantiated directly it accepts a config. The trouble with this option is, __construct also requires some other things when used like this. Besides that,...
2,503 Views
4 Replies
06-13-2021, 03:52 PM
forumz
    Thread: Registering custom validation methods in a module
Post: RE: Registering custom validation methods in a mod...

Thx for the reply. I know this way from the docs. However I want my module to be self-contained. The only change in app/Config/* should be enabling the module through adding its namespace. Everything ...
2,503 Views
4 Replies
06-12-2021, 02:40 AM
forumz
    Thread: Registering custom validation methods in a module
Post: Registering custom validation methods in a module

Here is the problem. I've got a module called Contact. It lives in a directory called modules/Contact. I registered a namespace Contact for the module in app/Config/Autoload.php. Everything seems to l...
2,503 Views
4 Replies
06-11-2021, 04:45 PM
forumz

Theme © iAndrew 2016 - Forum software by © MyBB