Forum
Slug from Date+Text Fields
Drew, in this post (https://forum.grabaperch.com/forum/08-25-2015-unique-url-for-list-and-detail-page) you stated,
"If date is a date field, you'll need to address the components of the date individually"
date-year
date-month
date-day
How would you write this if you are trying to combine a date and text field to create a unique slug?
I'm trying to create a link formated as follows:
=2016-02-24-title-of-event
<perch:content id="calendarSlug" type="slug" for="eventDateTime-year - eventDateTime-month - eventDateTime-day - eventTitle" />
Yes, this sure would be handy.
You should be able to use:
One more question: Do you have to include all three date components for it to work in slug?
Initially as a test, I had just
eventDateTime_year
andeventTitle
it didn't work, just returnedeventTitle
as the slug. I even swapped out other ID's to make sure the template was refreshing (and it was).Does this information below appear anywhere in the docs? (if so, couldn't find it)
THANK YOU :)
That worked great. Sometimes the undocumented features are just what you need. Thanks to both Seth and Drew.