ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

exp:weblog:next_entry broken?

August 17, 2010 11:20am

Subscribe [5]
  • #1 / Aug 17, 2010 11:20am

    TC-uk

    62 posts

    Hi,

    This used to work prior to an update (now 1.6.9.) and now doesn’t - arrows don’t appear at all.

    Anyone any ideas?

    <div id="arrow-navs">
    {exp:weblog:next_entry weblog="{my_weblog}" entry_id="{entry_id}"}
    <a href="http://{path="><div id="arrowback"></div></a>
    {/exp:weblog:next_entry}
    {exp:weblog:prev_entry weblog="{my_weblog}"  entry_id="{entry_id}"}
    <a href="http://{path="><div id="arrowforward"></div></a>
    {/exp:weblog:prev_entry}
    </div>

    Tony

  • #2 / Aug 17, 2010 12:04pm

    Design by Front

    106 posts

    Hey Tony,

    A few things to try..

    1) It seems that your “{path=" code is incomplete which may be breaking the link tag, can you try changing it to something like "{path=news/article}” (or whatever path makes sense for you to use here).
    2) make sure that “{entry_id}” is actually returning an entry id
    3) make sure that you are currently viewing a single entry and not a list of multiple entries or those tags wont work

    If none of the above work, it is possible that this could actually be a CSS issue, you could try adding text inside the links for ‘BACK’ and ‘NEXT’ to test this, like so:

    <div id="arrow-navs">
    {exp:weblog:next_entry weblog="{my_weblog}" entry_id="{entry_id}"}
    <a href="http://{path=news/article}"><div id="arrowback"></div> BACK</a>
    {/exp:weblog:next_entry}
    {exp:weblog:prev_entry weblog="{my_weblog}"  entry_id="{entry_id}"}
    <a href="http://{path=news/article}">NEXT <div id="arrowforward"></div></a>
    {/exp:weblog:prev_entry}
    </div>
  • #3 / Aug 17, 2010 12:16pm

    TC-uk

    62 posts

    HI,

    Thanks for the reply.  The post parser took the full paths out.  I’ll try again here, just inserting what’s inside {path=" to "} on the first <a > tag:

    casestudies/{casestudy_template_group}"}
  • #4 / Aug 17, 2010 12:43pm

    Design by Front

    106 posts

    Hey Tony,

    Assuming your a tag looks like:

    <a href="http://{path=casestudies/{casestudy_template_group}}">
    __Then that shouldn’t be a problem.__To further debug this, can you try hard-coding the weblog and entry_id values? Let’s say you have an existing case study with entry id of “24” and your weblog is called “case-studies”, try:__
    <div id="arrow-navs">_{exp:weblog:next_entry weblog="case-studies" entry_id="24"}_<a href="{path=casestudies/{casestudy_template_group}}"><div id="arrowback"></div></a>
    {/exp:weblog:next_entry}
    {exp:weblog:prev_entry weblog="case-studies"  entry_id="24"}
    <a href="http://{path=casestudies/{casestudy_template_group}}"><div id="arrowforward"></div></a>
    {/exp:weblog:prev_entry}
    </div>


    Can you also confirm that the page you are using this code on is only displaying one entry at a time? It would be great if you could post up a larger section of your template code if at all possible.

  • #5 / Aug 18, 2010 1:56am

    John Henry Donovan

    12339 posts

    Tony,

    Can you also add some text into your arrowback div just in case its a style issue

    <div id="arrowback">Back</div>

    Can you confirm that these tags are not nested inside the weblog:entries tag?

  • #6 / Aug 18, 2010 11:16am

    TC-uk

    62 posts

    Hi,

    Thanks for the replies.

    It’s not a css issue - all that is output is:

    <div id="arrow-navs">
    
    
    </div>

    I’ve tried hard-coding the entry_id and also inserting text in between.  I don’t think it likes the full exp:weblog:next_entry tag (or possibly what’s inside it).  Yes John, the <div id=“arrowback”>Back</div> tags are nested within the weblog:entries tag - they need to be to get the id_entry don’t they?  Also they worked like this before!?

    The following page within the casestudies area contains added variable text inside html comments: http://www.amberandgreen.co.uk/index.php/casestudies/scottish_newcastle/

    The full template code won’t get displayed fully here, should I attach?

    Thanks for your help so far,
    Tony

  • #7 / Aug 18, 2010 11:33am

    TC-uk

    62 posts

  • #8 / Aug 19, 2010 1:19am

    John Henry Donovan

    12339 posts

    tonycharman,

    Yes John, the <div id=“arrowback”>Back</div> tags are nested within the weblog:entries tag - they need to be to get the id_entry don’t they?

    Your exp:weblog:next_entry and exp:weblog:prev_entry should not be nested within your weblog:entries tag. If you had a typical single entry page then they would be dynamic.

    Your issue here is that you are using cruft free URLs I believe.

    Are scottish_newcastle and 49 both entries or is scottish_newcastle a template?

    Is case_studies your template group?

    Have you tried the Weblog pagination tags for next and previous page?
    http://expressionengine.com/legacy_docs/modules/weblog/pagination_page.html

    The full template code won’t get displayed fully here, should I attach?
    Yes please do.

  • #9 / Aug 19, 2010 6:49am

    TC-uk

    62 posts

    Hi John,

    It’s been a while since I’ve looked at the build of this site.  The execution seems quite heath-robinson, but it worked prior to the ee system update. 

    At the moment each case study has it’s own template.  Each case study group (eg. scottish_newcastle) has it’s own weblog AND it’s own Category.  From memory the reason for also having the Categories was to provide the client (who is doing most of the updating) with an easy way to influence the position of each weblog within the menu - Category Management has simple arrow up’s and down’s, something that is not available in the weblog edit entry page.  We had to make sure though that Category has a template which mirrors it’s name.  As I’m typing this I’m thinking ‘why!’, but at the time either my competence was less or it just didn’t work the normal way round.  The ability to have an active state on the menu for that entry/weblog was also a factor.

    Was going to paste the code in - but the parser is removing bits and bobs making it incomplete.  Is there a knack to this (even tried substituting { and } for html codes)?  I’ve attached the code in txt files…

    Many thanks for your help so far,
    Tony

  • #10 / Aug 19, 2010 7:09pm

    Brandon Jones

    5500 posts

    Hi tonycharman,

    As John Henry noted you’ll need to move your exp:weblog:next_entry and exp:weblog:prev_entry tags outside of exp:weblog:entries.

    If that still doesn’t work, create a test template with a bare minimum of code and no embeds. Get the pagination working there first and then slowly add features back in. Let us know how you get on.

  • #11 / Aug 20, 2010 3:39am

    TC-uk

    62 posts

    I’m an hour through and still no luck.  I’ve pulled the next_entry tags out of weblog:entries and simplified (not yet exhaustively) and the tag outputs nothing.

    So I thought I’d do some reading of the documentation…

    It seems that whilst I’ve been busy elsewhere weblog:entries and been quietly shown the door and replaced with weblog:channel?  Coming back to old work and trying to find documentation on the weblog:entries tag has been frustrating:

    http://www.google.co.uk/search?q=expression+engine+weblog:entries
    - top results are for weblog:channel and then the link to the old weblog:entries documentation page, show by google as ‘docs.expressionengine.com/modules/weblog/weblog_entries.html’ goes to a 404 page not found.

    If weblog:channel HAS replaced weblog:entries there’s no mention in the weblog:channel documentation - I think there should be.  There should also be a page on weblog entries, no?

    Interestingly trying to use the weblog:channel in my recently updated ee system has drawn a blank as well.  I need to switch this on??

    It’s early in the morning here - but I’m already a bit confused and frustrated.

    Tony

  • #12 / Aug 20, 2010 3:43am

    TC-uk

    62 posts

    Are most people upgrading to the 2.x release?

  • #13 / Aug 20, 2010 2:35pm

    Ingmar

    29245 posts

    It seems that whilst I’ve been busy elsewhere weblog:entries and been quietly shown the door and replaced with weblog:channel?

    That’s the new EE2 nomenclature, yes.

    Coming back to old work and trying to find documentation on the weblog:entries tag has been frustrating:

    Legacy docs can be found here.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases