Skip to content

Commit

Permalink
See changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
leigeber committed May 8, 2014
1 parent 209a1a6 commit 121bf25
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

2014-05-07

- Added new paginated and not_paginated tags
- Category segment variables now exclude native pagination segments

# 1.2.1
Expand Down
7 changes: 7 additions & 0 deletions system/expressionengine/third_party/helpvars/ext.helpvars.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ public function template_fetch_template()
// Member variables
$data['can_access_cp'] = ee()->session->userdata('can_access_cp');

$data['paginated'] = false;
$data['not_paginated'] = true;
$data['last_segment_primary'] = '';

if (REQ == 'PAGE' and ! empty(ee()->uri->segments)) {
$cats = $segs = $groups = array();
$site = ee()->config->item('site_id');
Expand All @@ -87,6 +91,9 @@ public function template_fetch_template()

if (preg_match('/^[P][0-9]+$/i', end($segments))) {
array_pop($segments);

$data['paginated'] = true;
$data['not_paginated'] = false;
}

$data['last_segment_primary'] = end($segments);
Expand Down

0 comments on commit 121bf25

Please sign in to comment.