Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Inheritance with templates.json
{ // All are mapped to specific files inside this style
// phpBB Base
"faq_body": "@self:faq_body.html.twig",
"index_body": "@self:index_body.html.twig",
"report_body": "@self:report.html.twig",
"search_body": "@self:search/body.html.twig",
"search_results": "@self:search_results.html.twig",
"viewforum_body": "@self:viewforum.html.twig",
"viewonline_body": "@self:viewonline/body.html.twig"
{ // phpBB Prosilver
"faq_body": "@phpBBBase:faq_body.html.twig", // Hardcoded to specific file in base
"index_body": "@phpBBBase:index_body", // Softcoded to use whatever index_body maps to in base
"report_body": "@self:report_body", // As is a loop to itself assume report_body.html.twig inside this style
"search_body": "@self:search/body.html.twig", // Slashes allowed for directories
"search_results": "@phpBBBase:search/results.html.twig",
"viewforum_body": "@phpBBBase:viewforum_body",
"viewonline_body": "@self:viewonline/body.html.twig",
"viewtopic_body": "@self:viewtopic_body.html.twig"
{ // phpBB Titan
"faq_body": "@phpBBBase:faq_body.html.twig",
"index_body": "@self:index_body.html.twig", // Use it's own index_body.html.twig file'
"report_body": "@phpBBProsilver:report_body", // Use the file specified in prosilver
"search_body": "@self:search/body.html.twig",
"search_results": "@phpBBBase:search/results.html.twig", // Despite the fact the mapping is different in prosilve for this map value, still use the specified file
"viewforum_body": "@phpBBProsilver:viewforum_body", // Use the mapping for viewforum_body so would end up rendering a template from base
"viewonline_body": "@phpBBMons:viewonline_body", // Use a template from phpBB Mons style
"viewtopic_body": "@self:viewtopic_body.html.twig",
"awesome_non_coresidebar": "@self:awesome_sidebar.html.twig"
{ // phpBB Titan
"faq_body": "@phpBBTitan:faq_body", // Titan uses templates from Mons and Mons uses templates from Titan
"index_body": "@phpBBTitan:index_body",
"report_body": "@phpBBTitan:report_body",
"search_body": "@phpBBTitan:search_body",
"search_results": "@phpBBTitan:search_results",
"viewforum_body": "@phpBBTitan:viewforum_body",
"viewonline_body": "@self:viewonline_body", // Use a template from phpBB Mons style
"viewtopic_body": "@self:viewtopic/body.html.twig",
"awesome_non_core_sidebar": "@self:different_sidebar.html.twig", // We can override this in general
"@phpBBTitan.awesome_non_core_sidebar": "@phpBBTitan:awesome_non_core_sidebar" // But maybe we only want to overide instances where it's used in phpBB titan (Or force usage of titan's when it's used inside titan/when it's specifically declared to use titan's as is this casen)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.