Keyword

UberPageBreak tip

  • Craig Pearson
  • Craig Pearson's Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 1 month ago #87177 by Craig Pearson
UberPageBreak tip was created by Craig Pearson
If your using UberPageBreak with K2 you might notice that when you click on page 2 or 3 and your page has a lot of stuff above the main text area the link will take you to the top of the page - ideally you would want this to go to the top of the article page that your viewing. Here's how.
In your K2 template (you would have to do this for all templates or the altered links from Uber will not work) go to the item.php file.

Around line 235 you should find the echo to introtext. Between the IF statements of the introtext and itemfulltext add <a id="topart" name="topart"></a>

Save

Go to the plug-in for UberPageBreak (plugins->content->uber...)
You will find a tmpl folder for table and tabs - make these changes to both or whichever your using.

in the default.php file find $link->pagelink; ?> and add #topart to it so it should be:
$link->pagelink; ?>#topart
also add to 
$output->navNextLink; ?>#topart
$output->navPrevLink; ?>#topart

thats it  - As long as your anchor is in the template the appended links from Uber should go to the top of the article area when choosing the pages

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum