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.

Pagination for an embedded news feed doesn't work on a Page Module page.

August 02, 2013 11:11am

Subscribe [1]
  • #1 / Aug 02, 2013 11:11am

    EB

    12 posts

    Hello,

    I’ve scoured a few old forum posts looking for a good solution that doesn’t involve creating multiple templates for pagination within a news post.

    My static page template looks like this (stripped down to essentials):

    {exp:channel:entries channel="node_page" limit="1"}
    {title}
    {content}
    
    {embed="includes/news"}
    {/exp:channel:entries}

    The embedded template works like this:

    {exp:channel:entries channel="news_article" paginate="bottom" limit="1" dynamic="no"}
     <article>
      {if article_media}
       <figure>
        something.png
       </figure>
      {/if}
     <h2><a href="http://{title_permalink=site/article}">{title}</a></h2>
    <p> {article_summary}<br />
     </article><br />
      {paginate}<br />
       Page {current_page} of {total_pages} | {pagination_links}<br />
      {/paginate}<br />
    {/exp:channel:entries}

    The page loads fine, but clicking the pagination links and adding the pagination segments to URL kills it. The pages module just drops everything and 404s.

    So far I’ve tried using a number of add-ons to manipulate the urls, but nothing seems to get around it. Does anyone have a trick of accomplishing this?

    In other posts, I’ve seen it recommended to do a separate news template, but my site is multi lingual, which means I’d have to create a template (or write a bunch of conditionals) for each language, which would be a huugge hastle, and wouldn’t be easily scale-able for additional languages.

    I’m running v2.6.1 - Build Date: 20130506. I also use NavEE for menus, if that matters.

    Thanks!

  • #2 / Aug 02, 2013 12:26pm

    Giraffentoast

    152 posts

    Not sure why you’re embedding the news at all?

    Try this:

    {exp:channel:entries channel="node_page" limit="1"}
    {title}
    {content}
    {/exp:channel:entries} 
    
    {exp:channel:entries channel="news_article" paginate="bottom" limit="1" dynamic="no"}
     <article>
      {title}
     </article>
      {paginate}
       Page {current_page} of {total_pages} | {pagination_links}
      {/paginate}
    {/exp:channel:entries}
  • #3 / Aug 02, 2013 1:53pm

    EB

    12 posts

    Thanks Giraffentoast!

    I tried the configuration that you recommended, but still no dice. I think this has to do with the pages module. Do you have a pages-run installation with a second, paginated news feed like this?

    Thanks!

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

ExpressionEngine News!

#eecms, #events, #releases