1

I have a few entries which are set to disabled. It seems that the live preview is not working then. It only works when the entry status is enabled.

This seems more like a bug than a feature, right?


Update

I have checked everything again and all conditions stated by Brandon below are met, but now I see that I actually don't use the "entries own url" setting. It's enabled, so I get the live preview button, but I use dynamic routing to create my own url's (because I need to add a category as a segment in the URL).

So that's probably where it goes wrong. I check the last segment of the URI as the slug of the specific entry and set my entry manually by it.

So how do I make live preview work than?

Tom De Smet
  • 1,456
  • 8
  • 28

2 Answers2

7

Live Preview will be available when the following are true:

  • The section’s “Entries in this section have their own URLs” setting is checked
  • The section’s “Entry Template” setting points to a valid template path
  • The entry has been saved

It doesn’t matter if the entry is enabled or not.

Brandon Kelly
  • 34,307
  • 2
  • 71
  • 137
  • All of those conditions are met. I'll send in some logs from the dashboard widget. – Tom De Smet Oct 28 '15 at 23:05
  • I have checked everything again and all conditions are met, but now I see that I actually don't use the "entries own url" setting. It's enabled, so I get the live preview button, but I use dynamic routing to create my own url's (because I need to add a category as a segment in the URL). So that's probably where it goes wrong. I check the last segment of the URI as the slug of the product and set my entry manually by it. So how do I make live preview work than? – Tom De Smet Nov 13 '15 at 21:57
  • @TomDeSmet You should probably create a new thread for that last question. – Mats Mikkel Rummelhoff Nov 15 '15 at 00:21
1

I assume your entry has a category field in it? In your section's settings, use something like this for the format URL:

{myCategoryField.first().slug}/{slug}

No need to roll you own routing, Craft will add the category's slug to your URL and do all of that properly for you.

RitterKnight
  • 6,582
  • 14
  • 24