Forum

Thread tagged as: Problem

Perch 3 - Template tag ID error

In some of my Templates in Perch 2 my perch:content id has a hyphen between the words, such as <perch:content id="spy-id" type="select" label="Scroll-Spy ID". This worked fine in Perch 2.

I notice that Perch 3 will not accept the hyphen see below: Template tag ID ‘subject-class’ contains disallowed characters Template tag ID ‘bg-colour’ contains disallowed characters Template tag ID ‘team-members’ contains disallowed characters Template tag ID ‘btn-color’ contains disallowed characters Template tag ID ‘home-page’ contains disallowed characters

This is going to be a pain changing all the ID's Is there any way around this?

Sample code: <!--Scroll Spy--> <div id="<perch:content id="spy-id" type="select" label="Scroll-Spy ID" options="spy_management, spy_regionalleaders, spy_teamleaders, spy_assessment, spy_leadership, spy_englishadvisors, spy_scienceadvisors, spy_businessadvisors, spy_wellbeingadvisors, spy_irishadvisors, spy_mfladvisors, spy_artadvisors" allowempty="true" required="false" />" class="row section scrollspy scroll-adjust type-disc"> <!--Title colour--> <h5 class="white-text z-depth-3 <perch:content id="subject-class" type="select" label="Title Colour" options="default-title|teal,phase1-title|light-blue, phase2-title|light-green, phase3-title|orange darken-2, phase4-title|red, phase5-title|purple" allowempty="true" required="false" />" style="margin-top:0px">

Derek White

Derek White 1 points

  • 4 years ago

I have just noticed that even with the warnings everything is still working - happy days. Will I just ignore the warnings?

Drew McLellan

Drew McLellan 2638 points
Perch Support

You can ignore the warnings if it's working. Just don't create any more IDs with dashes.

Ok, thanks Drew

Drew McLellan

Drew McLellan 2638 points
Perch Support

In 3.0.1 those are only shown to the primary admin.