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:is_page in EE2?

June 05, 2012 5:59pm

Subscribe [3]
  • #1 / Jun 05, 2012 5:59pm

    bromtec

    31 posts

    Hello,

    In order to keep my URL simple, I use one template with conditionals to both list blog summaries, as well as display individual blog posts, In other words, I like my blog to be at http://www.mydomain.com/blog and my posts to be at http://www.mydomain.com/blog/my-first-post

    I’m currently migrating a site from EE1 to EE2.  My conditional in EE1 looks like this -

    {if segment_2==FALSE OR '{exp:is_page}'==TRUE}

    Not sure where I found the syntax for the second condition, but it does not work in EE2, so my pagination is broken on pages other than page 1.

    Any ideas for something compatible in EE2?

    Thanks so much for any help -

  • #2 / Jun 06, 2012 12:05pm

    Kurt Deutscher

    827 posts

    Not sure if this will work for you or not, but off the top of my head:

    {if segment_2 == '' OR segment_2 == 'page'}

    There are somethings in EE that won’t work in any other segment but the one EE expects them to. You should make sure your pagination settings/paramaters/tags are all consistent with the newer pagination system EE rolled out last year.

    Also, it could be that /page/ only works in segment_3 and above, and not in segment_2 anymore.

    Hm… I wonder if setting the pagination base in the channels tag might also help:

    paginate_base='{segment_1}/page'
  • #3 / Jun 06, 2012 2:56pm

    Shane Eckert

    7174 posts

    Hey

    I agree with Kurt! Good stuff.

    Also check out this article, I have used this a few times.

    What do you think!

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases