Bug Report

Pagination, if previous_page doesn’t support if:else conditional

Date: 04/17/2008 Severity: Minor
Status: Not a Bug Reporter: GDmac
Version: EE 1.6.3 Assigned To: Not Assigned
Keywords: Control Panel, Templates, Modules, Weblog

Details

Use of control structure if:else is not supported inside pagination tag on previous_page. The first examples crashes hard on successive pages.

{paginate}
  {if
"{total_pages}" != "1" }
    {current_page} of {total_pages}
- {pagination_links}
  {
/if}
  {if previous_page} foo {if
:else} bar {/if}
{
/paginate}

second example (control structure before pagination links) won’t crash but pagination_links disappear on successive pages.

{paginate}
  {if
"{total_pages}" != "1" }
    {if previous_page} foo {if
:else} bar {/if}
    {current_page} of {total_pages}
- {pagination_links}
  {
/if}
{
/paginate}

Comment on Bug Report

Page 1 of 1 pages
Posted by: Derek Allard on 17 April 2008 2:12pm
Derek Allard's avatar

Thanks for reporting GDMac. using the “if:else” syntax is not currently a capability of {if previous_page}.  You may want to (a) make a feature request; (b) post what you’re trying to accomplish to the forums and see if another solution is presented.

Posted by: GDmac on 18 April 2008 3:55pm
GDmac's avatar

Was just hacking around, thanks for feedbacke

Name:

Email:

Location:

URL:

Remember my personal information

Notify me of follow-up comments?