Forum

Thread tagged as: Question, Configuration

Can I change a content id without losing content

Hello,

I am wondering if it is possible for me to change the id within the template and not lose the content contained within that field For example, I have page that has had a title change, and so I would like to change the id to correspond. So <perch:content id="index-heading" type="text" label="Heading" /> becomes <perch:content id="home-heading" type="text" label="Heading" />

within the CMS whatever content was in "index-heading is now gone. Obviously this is a fairly basic example, but a whole page of these changes will become quite time consuming to replace. Is there an easier solution than copy/pasting the information before I make the change?

Thanks in advance

Herman Steuernagel

Herman Steuernagel 0 points

  • 5 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

The id is how Perch identifies the content. If you change the ID then we can no longer identify the content so we can't retrieve it.

Small thing to add especially if your going to change IDs.

"IDs should be lowercase letters, numbers and underscores only." I haven't noticed bugs caused by using hyphens in IDs, but worth fixing just in case.

check required template attributes in the doc here