Forum
Slug appearing in editor form
Hi Drew,
I have a list/detail page set up but in the editor page for the detail an unlabelled field is appearing (which is the slug)
Is this the correct behaviour or should it be hidden and uneditable. This is how its referenced in the template
<perch:content id="slug" type="slug" for="design" suppress="true"/>
Is this the master template or a secondary template?
er… its the main template for the content of the detail page. its not a page template though its a content template.
Ok. If you add a label attribute does the label then display?
Can I see your diagnostics report?
I added a label but that dosen't display. Diagnostics follow.
Can you try tidying up the tag?
Done. Still shows up in the editor form.
Still without the label?
No label.
Can you make other changes to this template and see them take effect?
Yes. I've been tinkering with it most of the afternoon.
Are you sure it's the slug field you're seeing?
I think so. when I inspect it using the browser tools this is whats being generated in the editor form.
Could you show us your complete detail template?
Sure.
Hi,
the line that causing the problem is this one, probably due to the slug not having some key attributes like
type="slug"
andfor="design"
:If you change it to this it works
Simon, brilliant you're a star.
The template is for display fabrics and the repeater allow the editor to add different colour swatches. Currently at the bottom of the template there is a content tag "list-image" which allows the editor to select an image to show on the listing page. Is there a way to select one of the colour swatches to be the list image without having to add it again as a separate image?
Hi Nick, that's great.
In situations where I need a listing image, I usually have a separate tag for the 'Main Listing Image' followed by a Repeater for 'Additional Images'. Something like:
By the way, you should avoid using dashes in all your IDs, and use underscores instead. You'll probably run into problems otherwise.
Simon, many thanks for the above (I'll give that a go this afternoon) and the tip re: hyphens.