Forum
Unique URL for list and detail page
There's a risk the editor will forget the items he's previously added to a list and details product photo gallery and cause duplicated URL because of name repetition in using one field for the slug.
What would you suggest to use to prevent this? Can you tap in to the ID yet like this post? https://forum.grabaperch.com/forum/10-08-2014-list-and-detail-creating-a-unique-slug
Any bright ideas?
What type of content is it?
It's for a series of images to form a gallery page that ideally wants a unique URL to view/share a single image on (it's not a pop up gallery)
Something like this gallery_details.html...
Then there's a feed of the recently added image thumbnails on the home page. Clicking on one will take you to the unique URL. All doable except for the editor making duplicates.
Hmm, nothing too obvious to use to make it unique. I'm not sure I've got a good answer.
Could I add a date/time to the end of the slug?
Yes, you could do that if it makes sense in the context, sure.
If I could add the date/time to the end of the id="title" type="text" label="Picture Name" slug or perhaps add id="desc" to the end of the slug either could reduce/stop duplicates
But how do I join two id's / fields to make the combined slug URL?
"You can also use a space-separated list of IDs in the for attribute. This will draw content from multiple fields."
https://docs.grabaperch.com/docs/templates/attributes/type/slug/
do you mean...
or
If
date
is a date field, you'll need to address the components of the date individually -Ok thanks. Could you get a timestamp?
Not without creating a custom field type for a timestamp.