We have moved to Github. Please open tickets there.

Opened 17 months ago

Last modified 8 months ago

#4293 new Enhancement

offset_key param should be enougth to know offset

Reported by: sembrestels Owned by:
Priority: normal Milestone: Needs Review
Component: Core Version: 1.8
Severity: trivial Keywords:
Cc: brett@… Difficulty:

Description (last modified by ewinslow)

Nowadays when we have two or more list of entities in a page, we need to set a 'offset_key' string in the params to know which list we want to set the offset.

But it's not enought, we also have the offset as get_input(OFFSET_KEY). Here an example:

elgg_list_entities(array(

'offset' => (int) get_input('closed_offset'),
'offset_key' => 'closed_offset',

));

Default offset should be set as the offset key says.

Change History (5)

comment:1 Changed 16 months ago by Cash Costello

Refs #4293 removed unnecessary get_input('offset') calls since elgg_list_entities() calls that

Changeset: 9cca28b590a5884033c60af5a47aa3dcc383f7f0

comment:2 follow-up: Changed 16 months ago by cash

Can you give an example of where you would want to have two separate pagination on the same page?

comment:3 Changed 16 months ago by Cash Costello

Refs #4293 removed unnecessary get_input('offset') calls since elgg_list_entities() calls that

Changeset: 9cca28b590a5884033c60af5a47aa3dcc383f7f0

comment:4 Changed 12 months ago by ewinslow

  • Description modified (diff)

I don't think we need to support this per se -- we should direct our efforts toward the ajax route instead.

comment:5 in reply to: ↑ 2 Changed 8 months ago by zore

I can't imagine a situation where you need multiple pagination on the same page, but it doesn't matter. The job of a framework is support the developers in anything they want to do.

And adding support to this isn't a effort. It just needs one more line of code.

Note: See TracTickets for help on using tickets.