Home › Forums › Calendar Products › Events Calendar PRO › Overriding organizer template / fields
- This topic has 4 replies, 3 voices, and was last updated 10 years, 2 months ago by
Support Droid.
-
AuthorPosts
-
December 7, 2015 at 7:25 am #1036870
Chris
ParticipantIt is possible to copy the templates for regular event fields and venue fields to my custom theme, so I can override the fields (like adding the custom fields that are needed for our implementation).
But for the organizers, the plugin fetches the template directly from the original plugin admin path, so that it’s not possible to just copy the template to the theme for overriding the fields.
In file the-events-calendar/src/Tribe/Admin/Organizer_Choose_Meta_box.php, in the render() function, the line of code is:
include $this->tribe->pluginPath . 'src/admin-views/new-organizer-meta-section.php'Instead of one that will pull in an overriden view from our theme.
Is this something that will be patched/changed for future versions?
December 7, 2015 at 12:47 pm #1037100George
ParticipantHey @Chris,
Thanks for reaching out.
This is not something that can be done by default and will not be supported in future versions of the plugin. If you note that file path, the file you are referencing is an admin view, not just a normal front-end view.
The Events Calendar and its add-ons only support template overrides of front-end views at this time. We have no plans to change this because admin views are very, very crucial to the functioning of the plugins on a basic level.
If truly need to override a default admin-facing view, then at this time you unfortunately will have to edit core plugin code and thus maintain and re-do this customization after each plugin update 🙁 I’m sorry to bear that news! But by design these admin templates are not meant to be easy to customize and alter. Doing so can break core functionality of the plugin and lead to issues that are hard to track down if not done super, super carefully.
I hope this information helps, as disappointing as it may be in its content.
Sincerely,
GeorgeDecember 8, 2015 at 5:53 am #1037394Chris
ParticipantThe main issue is, it pulls this same file on the front-end when using the community event plugin. This same admin view is called on the front-end when making the event add form. There’s a view file (organizer-fields.php) in the /src/views/community/ directory, which is never called/displayed. It seems like this file should be used (and be possible to be overriden in the theme) when displaying the community add form on the front-end.
December 9, 2015 at 11:53 am #1038401George
ParticipantI’m sorry about the frustrations arising from this – that file is a bit weird, but the reason we use the same admin view for the front-end version of it is because of how sensitive that organizer-choosing meta box is.
And so just as customizing in the admin edit screen for an event could totally ruin core plugin functionality, then customizing this component on the front-end could render the organizer functionality for submissions useless 🙁
—
What are some specific things you’re trying to accomplish with customizing the Organizer fields? I might be able to recommend an alternative approach that is a bit less risky.
Thanks for your patience here,
GeorgeFebruary 18, 2016 at 8:32 am #1076047Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Overriding organizer template / fields’ is closed to new replies.
