EllisLab text mark
Advanced Search
     
Posting Long Articles with Commenting at the End
Posted: 15 February 2008 12:36 AM
Joined: 2007-10-13
102 posts

I have a article spanning across multiple pages. Is there a way to show comments only at the end of the article?

 
Posted: 15 February 2008 12:42 AM   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2005-06-30
680 posts

How are you spanning the article?
That is, which technique are you using to span it?
Have you seen the plugin/extension called Simple Pagination?

Terry

 Signature 

Terry Leigh Britton
My Google+ EE page
http://twitter.com/TerryBritton
http://terrybritton.com
Other EE resources for questions:
http://expressionengine.stackexchange.com/   http://eeinsider.com/  http://devot-ee.com/

 
Posted: 15 February 2008 12:44 AM   [ # 2 ]   [ Rating: 0 ]
Joined: 2007-10-13
102 posts

Hey Terry I am using {pagination_links} just to display 123>

 
Posted: 15 February 2008 01:38 AM   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2005-06-30
680 posts

Ahhh. Then your url shows P1, P2, P3?

You could set up a conditional that is triggered by the page number, I suppose, but that would only work in templates always showing that number of pages.

{if segment_4=="P3"}
Comments code
{
/if} 

What we need is an end-of-file type of test here.

Let me think a bit.

Terry

 Signature 

Terry Leigh Britton
My Google+ EE page
http://twitter.com/TerryBritton
http://terrybritton.com
Other EE resources for questions:
http://expressionengine.stackexchange.com/   http://eeinsider.com/  http://devot-ee.com/

 
Posted: 15 February 2008 01:48 AM   [ # 4 ]   [ Rating: 0 ]
Avatar
Joined: 2005-06-30
680 posts

Ok, I have to test this yet, but it might work.

{exp:weblog:entries weblog="news" orderby="date" sort="desc" limit="1" paginate="bottom"}

<h2>{title}</h2>

{summary}

{body}

{paginate}
<p>Page {current_page} of {total_pages} pages {pagination_links}</p>
{if {current_page}=={total_pages}}
{assign_variable
:last_page="yes"}
{
/if}
{if {current_page}
!={total_pages}}
{assign_variable
:last_page="no"}
{
/if}
{
/paginate}

{if 
"{last_page}"=="yes"}
{embed
="base1/_embed_comments" my_entry="{entry_id}"}
{
/if}
{
/exp:weblog:entries} 

It if doesn’t work, we will have to use the same idea in a different setup. Will test soon.

[Edit - this does work, but who cares - it doesn’t solve the problem correctly - see below!]

Terry

 Signature 

Terry Leigh Britton
My Google+ EE page
http://twitter.com/TerryBritton
http://terrybritton.com
Other EE resources for questions:
http://expressionengine.stackexchange.com/   http://eeinsider.com/  http://devot-ee.com/

 
Posted: 15 February 2008 03:10 AM   [ # 5 ]   [ Rating: 0 ]
Avatar
Joined: 2005-06-30
680 posts

Wait a minute…

Pagination links are for paging through a bunch of entries in a multi-entry page, where limit=2 or more and there are more then 2 entries. Those go between the opening and closing {exp:weblog:entries} and {/exp:weblog:entries} tags. It is used for paginating through blog posts or news entries.

Next/previous links are for on a single-entry page where you want to show the next item/entry in a similar fashion (not the same entry across several pages, called “spanning”) , but where limit=“1”, making it a single-entry page. Those link tags go outside the closing {/exp:weblog:entries} tag.

Two methods for spanning a single article across multiple pages exist (I discuss this exhaustively in this forum thread and in this wiki article). They are the method I describe using the Simple Pagination extension in that Wiki article, and the method employing multiple custom fields in a publish/edit page as described in the docs here.

I’m going to have to assume you will find one or the other of these methods superior to how you are spanning the article presently. Please try them out, and then get back to me here which one you’re going with, and I’ll try a similar trick as above to force comments into following the end of it. HOWEVER - I wouldn’t be surprised if either method, displayed via a single-entry comments page, would produce your desired effect. I will try that out and see.

Terry

 Signature 

Terry Leigh Britton
My Google+ EE page
http://twitter.com/TerryBritton
http://terrybritton.com
Other EE resources for questions:
http://expressionengine.stackexchange.com/   http://eeinsider.com/  http://devot-ee.com/