We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Plugin: Next / Previous Links Anywhere

Development and Programming

Super McFly's avatar
Super McFly
90 posts
15 years ago
Super McFly's avatar Super McFly

Introduction

With this ExpressionEngine 2 plugin you can now have next / previous links anywhere you want, including between the {exp:channels} tags.

Just supply the plugin with an entry ID and a type (next or previous) and you’re set. It works like the first-party next/previous entry linking.

Examples

{exp:sm_links type="previous" entry_id="3"}
    Previous entry: <a href="http://{l_path=content/blogs}">{l_title}</a>
{/exp:sm_links}

{exp:sm_links type="next" entry_id="3"}
    Next entry: <a href="http://{l_path=content/blogs}">{l_title}</a>
{/exp:sm_links}

Parameters:

type=”previous” Defaults to “”. Required. The type of link to create.

entry_id=”23” Defaults to “”. Required. The entry from which the results are generated.

category=”17” Defaults to “”. Limit by specific categories.

category_group=”2” Defaults to “”. Limit by category groups.

show_expired=”no” Defaults to “no”. Allow expired entried to be included.

show_future_entries=”no” Defaults to “no”. Allow future entries to be included.

status=”open” Defaults to “open”. Limit by entry status.

channel=”blogs” Defaults to “”. Limit by entry channels.

Variables:

{l_entry_id} The ID number of the entry.

{l_title} The title of the entry.

{l_channel} The channel title of the entry. Useful for conditional template paths.

{l_url_title}
The human readable title used in the URL as a permalink.

{l_id_path='site/index'} The path (template_group/template) where you want to show the entry. The entry_id of the entry will be automatically added.

{l_path='site/index'} The path (template_group/template) where you want to show the entry. The url_title of the entry will be automatically added.

       
michaelgr's avatar
michaelgr
1 posts
15 years ago
michaelgr's avatar michaelgr

Hi , thanks for sharing, this could be useful for me.

Is it possible to have it return a variable with the entry dates of the links also?

Michael

       
Super McFly's avatar
Super McFly
90 posts
15 years ago
Super McFly's avatar Super McFly

I’d love to help you but to be honest it probably won’t happen. I no longer use EE and so development of add-ons isn’t a priority for me.

Feel free to use the code however you want though, so try to get someone to just modify what I’ve done instead of starting from scratch.

Again, sorry, but I’ve moved on to less restrictive things.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.