Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Controller code:
- function PortfolioItems() {
- if (!isset($this->urlParams['Action']) || $this->urlParams['Action'] == 'All')
- $typeFilter = "";
- else
- $typeFilter = "AND `PortfolioPage`.ProjectType='" . $this->urlParams['Action'] . "'";
- $records = PortfolioPage::get()->filter(array(
- "ParentID => $this->ID,
- ))->where($typeFilter)->limit(3);
- return PaginatedList::create($records, $this->request);
- }
- // template render:
- <% if PortfolioItems.MoreThanOnePage %>
- <div class="pagination">
- <% if PortfolioItems.PrevLink %>
- <a href="$PortfolioItems.PrevLink"><span><img src="/themes/LittleMonkey2011/images/buttons/previous_off.png" id="previous" width="27" height="27" alt="previous" /></span></a>
- <% end_if %>
- <% control PortfolioItems.Pages %>
- <% if CurrentBool %>
- <span><img src="/themes/XX/images/buttons/page{$PageNum}_on.png" id="page{$PageNum}" width="27" height="27" alt="page{$PageNum}" /></span>
- <% else %>
- <a href="$Link"><span><img src="/themes/XX/images/buttons/page{$PageNum}_off.png" id="page{$PageNum}" width="27" height="27" alt="page{$PageNum}" /></span></a>
- <% end_if %>
- <% end_control %>
- <% if PortfolioItems.NextLink %>
- <a href="$PortfolioItems.NextLink"><span><img src="/themes/XX/images/buttons/next_off.png" id="next" width="27" height="27" alt="next" /></span></a>
- <% end_if %>
- </div>
- <% end_if %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement