-
-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Theme custom template partial customization & load #1538
Comments
I am curious in this too. There is probably some setting I am missing. For example. With featurebox category template you can just rewrite/add new template in theme folder (not copy all file, just part of array you want to change). But with items - featurebox template - you need to include all original template file. Thanks |
@Jimmi08 In featurebox plugin, might be something in these files around these lines, perhaps? |
Err, it seems getTemplate has a merge param.....
Got to figure out how it works.... |
@rica-carv just fyi: boolean is true/false |
@Moc |
Well, i sung victory too soon.... |
Is this issue still relevant? |
@Moc I haven't seen solution for this yet. If I want this: with custom plugin to add something to template without changing theme or core template. Before global variables could be rewrittten in plugin. |
related to #3195? |
Yes, before you was able replace constants, now you can't replace method with template class/object or what is it. |
I have added tests for getTemplate(). e107inc/e107-test@022109c (there's still some refinement to do) I believe that setting 'merge' to true by default (as well as keeping override=true as default) could solve most of the original issue mentioned above. ie. theme template keys would merge with existing plugin template keys. Any keys missing from the theme would be automatically filled by the plugin unless this feature is specifically disabled by the plugin. ie. By setting merge = false. The ability for plugins to override core/theme templates is a separate issue and will need to be achieved another way (see #3195 e_template.php idea) |
As far i remember, in v1.4 it seems to have a partial template load ability, like it's yet present on the core download plugin download_template.php (i.e.:
if(!isset($DOWNLOAD_CAT_TABLE_PRE)){....
)As it is now in v2, the templates are searched or in theme or in the plugin itself, loading the first found and discarding the second, right?
This forces a theme custom template to have all the defines from the original plugin template.
I think of some drawbacks:
The text was updated successfully, but these errors were encountered: