Forum

Thread tagged as: Question, Runway

Inserting item into a collection and auto generate slug value

Hi,

I have a collection named "Jobs" with a slug based on the title value like so

<perch:content id="title" type="text" label="Job Title" required="true" suppress="true" />
<perch:content id="jobSlug" for="title" type="slug" suppress="true" />

When inserting an item into this collection programmatically, i;e via an XML import, what are the rules for generating the slug value?

Many thanks

Lee Goodman

Lee Goodman 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

The field type should handle it, provided that the field it need to create the slug from is available in the data it's given.