Forum
Event App in Perch 3: custom template not visible
My custom template «event.html» is in the proper folder (/perch/templates/events/event.html). The markup written by Perch is also correct. But, I can't see it in the editing area...there is another one with the fields: Name - Description - Date - Category. My app.php looks like that:
<?php
$apps_list = array(
'content',
'categories',
'perch_events',
);
?>
And finally how it is called in the page:
<?php
perch_events_custom(array(
'filter'=>'eventDateTime',
'match'=>'gte',
'value'=>date('Y-m-d'),
'sort'=>'eventDateTime',
'sort-order'=>'desc',
'template'=>'event.html'
));
?>
Any idea where my fault is? Thanks a lot!
If you turn on debug, it should output the details of all the templates that are being used. What does it say about it?
So far it seems to be correct, the output is:
Using template: /templates/events/event.html
Can you show us your template?
Here it is:
Thanks a lot for having a look, Drew!
You're using
perch:content
tags in an Events template. You should change them toperch:events
to match the existing tags.So far ok, I can see now the a-tags. But unfortunately I still have a description tag and a categorie headline in the template output... What is still wrong? Thanks again!
Where in relation to the content in the template?
The output in the markup is fine. But the fields in the editing area are the following: 1. Name (says «required») 2. Description (which I don't use) 3. Date 4. my custom fields for eventURLs 5. Categories (only the headline) The order is also wrong, it should be date - title - custom fields. I left the IDs the same in my custom template as you see above. Maybe it helps to show you the whole debug message:
Your help is much appreciated!
Hi Martin,
the Events app is quite an old app - it hasn't been updated to the much newer Perch style of creating all admin fields through templates. The name, description and category fields are hard-coded in the app code to always appear - you can't turn them off.
Well, you can turn them off by editing the Events app files - and as the Events app is highly unlikely to be updated (by the Perch team), you are probably safe to do so.
Hi Duncan
Thank you for your reply!