We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Live Preview mixed with other entries

How Do I?

Dion's avatar
Dion
38 posts
about 5 years ago
Dion's avatar Dion

When trying to use Live Preview, I’m seeing the last added entry in between the live content. Live Preview works but I’m seeing two titles (one live and one from the last entry).

I wonder if I am doing something wrong inside the channel entry tag. When I close all entries, live preview works. This channel also has other statuses other then open/closed.

{exp:channel:entries channel="xxx" limit="1" disable="categories|category_fields|member_data|pagination"}

This only happens when trying to publish a new entry, previewing existing entries (with existing saved content) works fine.

Maybe someone has any ideas? Thanks.

       
Rob Allen's avatar
Rob Allen
2,950 posts
about 5 years ago
Rob Allen's avatar Rob Allen

Yes I’ve seen this, saving the new entry first cures it.

It’s also a good idea to modify the entries tag to add custom statuses in your preview template:

{exp:channel:entries channel="xxx" limit="1" disable="categories|category_fields|member_data|pagination" status="open|featured{if is_live_preview_request}|closed|pending{/if}"}

…that way the author can see the preview no matter what the status.

       
Dion's avatar
Dion
38 posts
about 5 years ago
Dion's avatar Dion

Simple solution, Rob. I just needed to include:

require_entry="yes"

It’s even mentioned at EE University. The ‘status’ wasn’t the issue, although your suggested code will come in handy!!

Thanks for helping Rob.

       
Rob Allen's avatar
Rob Allen
2,950 posts
about 5 years ago
Rob Allen's avatar Rob Allen

Glad you found a solution, things do tend to vary from site to site.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.