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.

Show future entries to authors

October 28, 2011 8:33am

Subscribe [4]
  • #1 / Oct 28, 2011 8:33am

    bsjosten

    100 posts

    Hi,

    I wonder if there is a way to show future entries to certain member groups.

    For instance, I would like my authors to be able to see their entries on the real web site, even when they are set to publish at a later date.

    Thanks,

    /Bo

  • #2 / Oct 28, 2011 9:28am

    Marc Debiak

    36 posts

    I would suggest setting up Live Look so they can see the entries in the Control Panel.

    Otherwise, If they need to be on the front end, do a conditional.

    Setup a status for “Pending” and do something like…

    <pre><code>
    {if member_group == '7'}

    {exp:channel:entries channel="" status="open|Pending"}
    {/exp:channel:entries}

    {if:else}

    {exp:channel:entries channel="" status="open|Pending"}
    {/exp:channel:entries}

    {/if}

  • #3 / Oct 28, 2011 9:29am

    Marc Debiak

    36 posts

    Of course you’ll want to change the member_group from 7 to the actual member group number that you’re trying to show entries to… 😊

  • #4 / Oct 28, 2011 9:31am

    Sue Crocker

    26054 posts

    Thanks for the assist, Marc.

    That’s how I’d handle it too, bsjosten. Make sense?

  • #5 / Oct 28, 2011 9:50am

    bsjosten

    100 posts

    It makes some sense, but it is not very elegant, for two reasons:

    1. A separate status would require another update once it is time to publish. Ideally, the future publishing date would be set when the entry is made.

    2. Using if statements and separate channel:entries loops duplicates A LOT of code (hundreds of lines. This makes maintenance a nightmare.

    I was looking for a more general solution, like allowing certain member groups to always see future entries. Preferably without having to resort to php.

    Any ideas?

    Thanks,

    /Bo

  • #6 / Oct 28, 2011 10:02am

    Marc Debiak

    36 posts

    Sure, you could setup a template called “preview” or something and put the code in there.

    Then, in the Template Manager, set access to a specific group.

    http://o7.no/v17vlw

  • #7 / Oct 28, 2011 10:04am

    bsjosten

    100 posts

    Regarding the Live Look, I don’t really see how this helps.

    If the entry has a future date, it doesn’t show up in Live Look.

    Or am I missing something?

    /Bo

  • #8 / Oct 28, 2011 10:06am

    Marc Debiak

    36 posts

    Live look is using a different template that is almost an exact duplicate of the live template. The only difference is that you’re show_future_entries=“yes” in you live look template.

  • #9 / Oct 28, 2011 10:09am

    bsjosten

    100 posts

    Marc,

    If I set up a separate template, I end up with hundreds of lines of duplicate code. That is just a maintenance nightmare.

    Isn’t there a better way?

    /Bo

  • #10 / Oct 28, 2011 10:11am

    Marc Debiak

    36 posts

    It’s really not a nightmare, I do it on every site.

    You just copy from one template, paste into the other and change one line.

  • #11 / Oct 29, 2011 8:59am

    Mark Bowen

    12637 posts

    Hi Bo,

    There isn’t anything built in to ExpressionEngine to allow for what you want other than the items mentioned above.

    If none of that is of any help then I’d suggest perhaps posting a Feature Request to see if anything can be added to ExpressionEngine in order to do this.

    Does that make sense?

    Thanks,

    Mark

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

ExpressionEngine News!

#eecms, #events, #releases