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.

Combine Blog Overview Page with Comments Page

September 15, 2011 6:58am

Subscribe [3]
  • #1 / Sep 15, 2011 6:58am

    Milaan

    33 posts

    Hello!

    I would like to combine the overview of all blog entries with the comments page, for example:

    http://www.domain.com/blog and http://www.domain.com/blog/this-is-my-entry

    EE does so far a good job but i want to display on the overview page only the field “excerpt” and on the comments page the fields “excerpt” and “text”. But i don’t know how…

    Is there any conditional to check if I’m in an comments view?

    Tobias

  • #2 / Sep 15, 2011 11:07am

    Boyink!

    5011 posts

    {if segment_2 !=""} would tell you if you were on a single-entry view.

  • #3 / Sep 15, 2011 11:09am

    Milaan

    33 posts

    Yes, but this wouldn’t work anymore if i want to display blog entries by category, for example:

    http://www.domain.com/blog/category/computer

    For now, i created a second template because i didn’t find a way to combine both into one template… but there must be some way since EE shows the comments only on the comment page.

    Tobias

  • #4 / Sep 15, 2011 11:20am

    Boyink!

    5011 posts

  • #5 / Sep 15, 2011 1:58pm

    Mark Bowen

    12637 posts

    Hi Tobias,

    Just wanted to see if the link from Mike helped here at all?

    Thanks,

    Mark

  • #6 / Sep 15, 2011 3:05pm

    Milaan

    33 posts

    Well yes, but i didn’t look like a simple solution. I was hoping that EE can solve this problem out of the box.

  • #7 / Sep 16, 2011 11:47am

    Mark Bowen

    12637 posts

    Hi Milaan,

    If you are trying to use one template for both an overview and the comments view then you are going to need to use a conditional much like Mike showed above in order to know where you are.

    ExpressionEngine out of the box doesn’t know what type of template you’re on so you would be needing to do some custom coding here.

    I’m going to move this one on down to Community Help as it’s not really a technical support issue as such.

    As mentioned though a conditional here is probably the best way to go. That or using a separate template for comments so that you know exactly where you are within the system.

    Hope that helps a bit.

    Thanks,

    Mark

  • #8 / Sep 19, 2011 11:05am

    Milaan

    33 posts

    Ok, i see. But actually, i wonder how EE knows that i just want to view a single entry as soon as the URL is http://www.domain.com/blog/this-is-my-entry. Also, if the url is http://www.domain.com/blog/, EE ignores {exp:comment:entries} or {exp:comment:form} tags.

    I mean if EE knows about that, shouldn’t it be possible for a user to make use of this information without plugins?

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

ExpressionEngine News!

#eecms, #events, #releases