DataMapper ORM v1.8.1 |
[eluser]IgnitedCoder[/eluser]
Apologies if I wasn't to clear with my question... Basically I want to grab the page numbers as follows: Assuming I have 10 pages of data and I'm showing records per page. I can easily do Prev / Next using the documents options but what I'd like to do is display the page numbers as well as in: Prev 1 2 3 4 Next - so when a user select page 4 the page numbers change to Prev 4 5 6 7 Next - Everything else is working great already. I can of course calculate this base on total page count and current page but it would be nice if the $paged object calculates it for me just like setting CI std pagination options i.e. $config['num_links'] = 2; will produce Prev 1 2 Next. Hope this makes more sense... PS F#$%@ awesome "excuse the french ![]() Brendan
[eluser]WanWizard[/eluser]
You can do that with CI's standard pagination class. It will produce exactly that. You only need to do some calculations, because pagination works with record numbers, while get_paged() works with pagenumbers.
[eluser]Unknown[/eluser]
in DMZ_VERSION 1.8.1 i found some mistake. 1. public function group_start($not = '', $type = 'AND '){ .... Code: $this->_where_group_started = TRUE; (miss line) } 2. public function group_end(){ ... Code: return $this; (miss line)
[eluser]WanWizard[/eluser]
This has been fixed a few days ago, please download the latest zip...
[eluser]Damir Sivic[/eluser]
Is there any way make method "droop_down" in datamapper class, because I need it (and I think others to ) very often for select fields,
[eluser]WanWizard[/eluser]
No, there isn't. Datamapper provides the basic methods to interact with your database, the rest is up to you. Add a method to your model that returns an array that you could use in your views.
[eluser]rherriman[/eluser]
Better yet, write a DataMapper extension to handle behavior like that, if you need to use it for multiple models!
[eluser]WanWizard[/eluser]
If you can make it generic enough, than that's definately a better option. I might even consider adding it to the distribution if it's useful enough for others.
[eluser]Basketcasesoftware[/eluser]
[quote author="Damir Sivic" date="1307977384"]Is there any way make method "droop_down" in datamapper class, because I need it (and I think others to ) very often for select fields,[/quote] Someone is working on an extension for that for DataMapper Form DMZ Extension The developer is also working on a method for doing option groups as well an check boxes and buttons.
[eluser]theprodigy[/eluser]
Quote:The developer is also working on a method for doing option groups as well an check boxes and buttons. Thanks for the link Basketcasesoftware. I appreciate it. And actually, it's checkboxes and radios, but I can try to include buttons if you can give me a good idea of what you have in mind ![]() |
Welcome Guest, Not a member yet? Register Sign In |