Forum

Thread tagged as: Question, Gallery

Editing album slug

Hello,

I'm using the Gallery app. Is it possible to edit an album slug at all?

When adding a new album, a slug is created as expected. However, if I change the album's title, the slug isn't updated.

I tried adding the following to the template, the field didn't appear on the edit form

<perch:gallery id="albumSlug" type="slug" for="albumTitle" suppress="true" editable="true" label="Slug" />

The field appears when I change the id to something else, but, as expected, it doesn't affect the intended slug.

I'm using album slugs in URLs, so it would be nice if a title change updates the slug.

Hussein Al Hammad

Hussein Al Hammad 41 points

  • 1 year ago
Ben Furfie

Ben Furfie 3 points
Registered Developer

Try removing the suppress="true" from the tag. Then refresh the page. If it doesn't appear, try republishing the pages via the Pages panel.

Drew McLellan

Drew McLellan 2517 points
Perch Support

The slug doesn't change, as it's intended to be used as part of the URL. Changing the slug would break your URLs.

Noted. Thanks Drew.

Ben Furfie said:

Try removing the suppress="true" from the tag. Then refresh the page. If it doesn't appear, try republishing the pages via the Pages panel.

Ben, the suppress attribute, generally speaking, just hides the output when set to true. It doesn't affect the edit form. When it comes to slugs, the editable attribute has to be set to true in order for it to appear on the edit form.

Thanks for your input anyway!