Jump to content

csmith

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by csmith

  1. @jwgiglio Had a cutback lane to the right but wasn't patient enough, needs to see more snaps as the primary back wi… https://t.co/yGzPugADCi

  2. RT @DZone: Twelve Important Design Patterns via #MVB Steven Lott https://t.co/rKdnw2RLd5 #devops https://t.co/7XogNoICWO

  3. RT @BracketBattles1: College Football Playoffs 2016 • ACC Quarterfinals • RT ~ NC State Fav ~ Clemson https://t.co/1q5gRE2D6O

  4. So it looks like something is generating the "..." as a way of saying there are more than ten pages, then listing the final page. In this case, there are only 11 pages, so it looks kinda silly. But bootstrap's styles are floating the <a> and not the <li> so the "empty" <li> is ending up on the end, looking even sillier. I'm working to adjust the styles so that at least the elipses will be in the right place.
  5. @Joss - Removing the rsort() did not affect the empty <li>. But interestingly enough, changing the limit of blog posts to 8 did fix the problem. No idea why that would be, though...
  6. Here's the entire function: function blogList(){ // Grab the page name from the url $thisCategory = wire("page")->name; // If the category is not called "blog" then output the category name as a selector for the find. if($thisCategory !="blog") { $category = "Category.name=" . $thisCategory; } // Get the blog posts - limited to five for later pagination $blogposts = wire("pages")->find("parent=/article/, $category, limit=5, sort=-created"); rsort($blogposts); $out =" "; //Loop through the pages foreach($blogposts as $blogpost){ $out .="<div class='posts sidemeta'>"; $out .="<div class='post'>"; $out .="<div class='date-wrapper'>"; $out .="<div class='date'>"; $out .="<span class='month'>{$blogpost->published_date}</span>"; $out .="</div><!-- /.date -->"; $out .="</div><!-- /.date-wrapper -->"; $out .="<div class='post-content'>"; $out .="<h2 class='post-title'>"; $out .="<a href='{$blogpost->url}'>{$blogpost->headline}</a>"; $out .="</h2>"; $out .="<ul class='meta'>"; $out .="<li class='categories'><a href='{$blogpost->Category->httpUrl}''>{$blogpost->Category->title}</a></li>"; $out .="<li>{$blogpost->author_name}</li>"; $out .="</ul>"; $out .="<p>{$blogpost->abstract}</p>"; $out .="<a href='{$blogpost->httpUrl}' class='btn'>Read more</a>"; $out .="</div>"; $out .="</div>"; $out .="</div>"; } // Pagination $out .="<div class='pagination'>"; $out .= $blogposts->renderPager(array( 'nextItemLabel' => "Next", 'previousItemLabel' => "Prev", 'listMarkup' => "<ul>{out}</ul>", 'itemMarkup' => "<li>{out}</li>", 'linkMarkup' => "<a class='primary-color' href='{url}'>{out}</a>" )); $out .="</div>"; echo $out; } Thanks again for your help.
  7. Hi Joss, Thanks for looking into this. Here's the HTML for the pagination: <div class="pagination"> <ul> <li><a href="/blog/"><span>1</span></a></li> <li><a class="primary-color" href="/blog/page2">2</a></li ><li><a class="primary-color" href="/blog/page3">3</a></li> <li><a class="primary-color" href="/blog/page4">4</a></li> <li><a class="primary-color" href="/blog/page5">5</a></li> <li><a class="primary-color" href="/blog/page6">6</a></li> <li><a class="primary-color" href="/blog/page7">7</a></li> <li><a class="primary-color" href="/blog/page8">8</a></li> <li><a class="primary-color" href="/blog/page9">9</a></li> <li><a class="primary-color" href="/blog/page10">10</a></li> <li>…</li> <li><a class="primary-color" href="/blog/page11">11</a></li> <li><a class="primary-color" href="/blog/page2">Next</a></li> </ul> </div> and here's the php from my functions.inc file: $out .="<div class='pagination'>"; $out .= $blogposts->renderPager(array( 'nextItemLabel' => "Next", 'previousItemLabel' => "Prev", 'listMarkup' => "<ul>{out}</ul>", 'itemMarkup' => "<li>{out}</li>", 'linkMarkup' => "<a class='primary-color' href='{url}'>{out}</a>" )); $out .="</div>"; echo $out; Not sure what would be causing that extra <li> without any content.
  8. RT @mortreport: #TBPick RT @NFLSTROUD Smith says the QB position is as strong as anywhere he has ever been. Called Mike Glennon the QB of t…

  9. I've been using this system for my company's blog for some time now, but recently I've noticed an issue with the pagination. There appears to be a list item with nothing in it that's producing an ellipses at the end of the pagination bar at the bottom of the page: You can see it live here: http://answerhub.com/blog Any idea why this might be happening?
  10. Watching #TheFollowing tonight. So far so good :)

×
×
  • Create New...