Welcome Guest, Not a member yet? Register   Sign In
Can we tell by visiting a website that it is codeignited ?
#11

[eluser]notebook[/eluser]
Thanks everyone for all your replys , i am very happy to see such a great an enthusiastic community of codeigniter.The better solution seems to me to ask for the source code for a particular page of that website as mentioned by some of the posters here.Can anyone also care to reply my second question , please ? With such a great community i think i'll be able to do all of my projects by myself Wink
#12

[eluser]tonanbarbarian[/eluser]
with the same code you have given i do not question whether some of the pagination code should be moved to the model.
I feel it is exactly where it should be

what i question is whether the table generation code should be moved to the view.

because the table generation code is taking data and preparing it to be presented, it really should be in the view.
now some people say that my web designers who work with my views would not understand that code and would not be able to update it. That is fine and there are ways around it, but views are used to present data.

Personally I do not use the table class for this very reason. If I use the PHP heavy code of the table class to generate a table 2 things will happen

1. Any competent web designer who is working on my views will complain that I have used a table when I should have used divs

2. The same competent web designer will want to strip the php code out and use html in its place to create the table so that it is easier for them to control the styling by the addition of ids, classes and using sub elements inside the table cells such as divs, spans and the like.

Just my opinions and I am sure others will disagree
#13

[eluser]notebook[/eluser]
[quote author="tonanbarbarian" date="1289456064"]2. The same competent web designer will want to strip the php code out and use html in its place to create the table so that it is easier for them to control the styling by the addition of ids, classes and using sub elements inside the table cells such as divs, spans and the like.

Just my opinions and I am sure others will disagree[/quote]

Can we use styling with the table class as well ?
Is'nt it the config file the right place to define these variables for pagination even if we put the rest of the pagination code in the controller.

Code:
$config['base_url'] = site_url('person/index/');
         $config['total_rows'] = $this->personModel->count_all();
         $config['per_page'] = $this->limit;
        $config['uri_segment'] = $uri_segment;

Excuse my ignorance , i am just a beginner of MVC, PHP and codeigniter. But i really want to learn all these things strictly following MVC and framework's standards and rules.




Theme © iAndrew 2016 - Forum software by © MyBB