Welcome Guest, Not a member yet? Register   Sign In
DataMapper ORM v1.8.1
#31

[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 Smile" library I can't even remember when I last used AR. I hope your lib ends up in reactor as a standard. I've been using it in production apps without issue, in fact with nginx setup it performs very well in all of my tests and when the tables are properly indexed it can handle anything I've thrown at it.

Brendan
#32

[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.
#33

[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)
return $this;
}

2. public function group_end(){
...
Code:
return $this; (miss line)
}
#34

[eluser]WanWizard[/eluser]
This has been fixed a few days ago, please download the latest zip...
#35

[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,
#36

[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.
#37

[eluser]rherriman[/eluser]
Better yet, write a DataMapper extension to handle behavior like that, if you need to use it for multiple models!
#38

[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.
#39

[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.
#40

[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 Wink




Theme © iAndrew 2016 - Forum software by © MyBB