• Resolved n9yty

    (@n9yty)


    I’m just trying to dig in and set up some template overrides, I have looked at every knowledgebase article I could find, but to be honest there is a lot of confusion for me about the regular templates versus block templates versions which parts still use v1 and which use v2… The “how to” bits target specific things but don’t really do much to cover this overview level of how all those various things fit together.

    I am almost positive we are using the block editor, so if that sets the stage for the following let me know…

    I started by making the directory in my child theme and I just copied over a few things that I thought would change the event listing page:

    tribe/events/v2/list.php
    tribe/events/v2/list/ {whole directory}
    tribe/events/v2/modules/ {whole directory}

    Even without making any changes to nay files, the layout changed when rendered. If I rename/remove the list.php file it goes back to the original, but why would simply copying one of these over alter the layout without making any modifications to them?

    This goes back to how confusing it is and how the pieces fit together, something I think needs better documenting.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support WilloftheD

    (@abzlevelup)

    Hello @n9yty,

    Thanks for reaching out to us. Apologies, template overrides could be really confusing, would also require a bit of knowledge with PHP and CSS. Appreciate you providing me more information here.

    You are updating the correct files here [your-child-theme]/tribe/events/v2/, using the block editor in V2.

    I could suggest a workflow for you in updating these files, until you familiarize it. Could you follow these steps, and try it out on your end?

    1. Find the template file, you could use this reference here
    2. Open the file, then in the file we place a hint/comment on how to override it with the directory — see the screenshot here
    3. Create the file on your Child Theme

    In this way, this could be a guide until you familiarize the template files and know where exactly these section, modules are located and how to override them.

    Even without making any changes to nay files, the layout changed when rendered. If I rename/remove the list.php file, it goes back to the original, but why would simply copying one of these over alter the layout without making any modifications to them?

    I’m not entirely sure why it was changing on your end, there shouldn’t be any difference when you copy and paste the file initially. It would change if you added different snippet or code on the child theme. I suspect it the same file but from a different directory.

    See an example of template customization here.

    This goes back to how confusing it is and how the pieces fit together, something I think needs better documenting.

    Rest assured that we are continuously updating our knowledgebase. Appreciate the feedback @n9yty.

    Let me know how it goes on your end. I’d be glad to help you out further.

    Best,
    Abz

    Thread Starter n9yty

    (@n9yty)

    I had left a reply here, but something must have gone wrong in the posting as it never showed up.

    I apologize for the confusion, but that is what my first query was about, all the confusion over the different versions of the templates, and while I can no longer find it I thought for sure that I had read that the block versions used the v1 templates.

    It seems that somewhere in the process that is what I had done, so it explains why the output looked substantially different from the defaults without the override files being in place.

    I have since moved the v2 templates in place and they are performing the same as the original and I am able to start making changes.

    Thank you for the pointers, and as always it is better to find out there is a user error rather than a problem in the plugin. 😉 I appreciate your patience, but I think I should be on the right track now.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Template part confusion’ is closed to new replies.