But I don’t seem to be seeing the changes I’m expecting in embeds. I’ve added a couple of custom css class names and I’ve changed <%= post.user.username %> to <%= post.user.name %>. Would appreciate some more nudging in the right direction to get this working. I can’t imagine it’s too complicated to override a plugin template file from another plugin.
What I have been able to do is enter the app and manually copy my plugins version of the template over to /var/www/discourse/app/views/embed/ then I restart the app and I see the results I’m looking for.
I just need to have the auto-magically happen when the plugin is loaded, and that’s where I’m stuck.
@Canapin Yes! Got it all working. Here is what the plugin.rb ended up looking like. Turned out I just had a path issue where I was putting the custom version of the file.
I ended up putting it in a folder /custom_views/embed/comments.html.erb
# frozen_string_literal: true
# name: optuma_discourse_custom_embed
# about: A simple plugin to used to customise the template in the forum embeds
# version: 1.0.0
# authors: Optuma Pty Ltd
# url: https://github.com/OptDev/optuma-discourse-custom-embed
# required_version: 2.7.0
::EmbedController.prepend_view_path File.expand_path("../custom_views", __FILE__)