1

I am working on a site that has an events calendar with Future, Current and Expired events being shown. Which is completely fine when I am on the index page and have "Entries in this section have their own URLs" checked for that section. The problem I run into then is that the permalink page will only show entries that the are live. Pending and Expired entries will never be shown (As mentioned in this questions and answer).

We have a lot of events that have similar or the same name that happen on a weekly or monthly basis. For example "Live Music at Blue Skies Winery" produces a slug of "ive-music-at-blue-skies-winery" when I had Entries in this section have their own URLs it would increment the slug like live-music-at-blue-skies-winery1 and the next one would be live-music-at-blue-skies-winery2.

So as a result I have disabled it for my event section but as a result now entries with the same title have the same slug of live-music-at-blue-skies-winery without being incremented.

Is there a way to force the slugs to be unique either by incrementing the slug like happens when I have Entries in this section have their own URLs checked or is it possible to prepend the entry date 03-01-2015 to the slug name?

  • 1
    Check out this question as well... – Lindsey D Mar 15 '15 at 18:21
  • Thanks Lindsey that is actually what I ended up doing because I really didn't want to go through and edit all of My existing entries – Justin Long Mar 15 '15 at 18:25
4

You should probably just set your event dates using custom Date/Time fields rather than the Post Date and Expiration Date fields. That way you don’t have to fight with Craft’s restrictions on non-live entries.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.