would it be possible to hook filters in functions that manage the content layout, in Events+ ?

Hi ! Would it be possible to hook filters in functions that manage the content layout, in Events+? Currently, functions like the_content(), get_event_details, get_event_date(), etc. have a strong hand on how things are displayed. A lot of things are pretty difficult to tune, even making a custom template : changing the breadcrumb place, etc.

Thanks!
Yann

  • Jack Kitterhing

    Hi there Yann,

    I hope you are well today and thanks for your question.

    It should be possible, normally to create the custom templates, you'd copy across archive-incsub_event.php" and "single-incsub_event.php and then copy them to your theme root.

    They can then be edited as needed, I'm also going to flag the lead developer here for some clarification on this :slight_smile:

    Thank you!

    Kind Regards
    Jack.

  • yannlossouarn

    In fact I already created these templates, it works. The issue is that in reality, most of the layout is hardcoded in the plugin code (returned directly by some functions that are in the plugin code) and almost no change can be made through the template. For example if you want to move the breadcrumb path, or to alter the local layout of the date and venue data, there seems to be no way to do so.

  • Vladislav

    Hello,

    As @Jack Kitterhing said, if you're already using custom templates, you can make use of the underlying model instance (Eab_EventModel, defined in lib/class_eab_event_model.php). This class allows low-level access methods to all the underlying event data - start/end times, venues, maps, titles and content, etc. The methods are fairly well commented, so you can perhaps start there and get the events output just the way you want them. For some example usage, you can also check the full width template that comes with the plugin.

    Another possibility is overriding the templating methods by extending the the Eab_Template class. This way you can simply change the templating methods to better fit with your needs out of the box. Once your class is in place, you can tell the plugin to make use of it by hooking up to "eab-templating-template_class" filter and returning your class name. Any method called with eab_call_template procedure (most of them are) will then be called from your class instead. I hope this helps.