Search the Community
Showing results for tags 'template engine'.
-
Hi, Is it possible for home.twig or any other template to be inserted inside a other larger template which is like an empty enveloppe, a template parent ? And at the same time to have placeholder from several part ? Thank you
-
Hello, recently i came across this issue. Basically, I am using TemplateEngineBlade module which allows me to use Blade templating engine in my templates. I needed to translate strings like '__(<your string>)', but since the module compiles the templates into its own directory (as highlighted in screenshots), the language translator find the function call in 2 files: Template where the code is written Modules 'compiled'/cache directory where the templates are in their compiled state Now, I actually have to translate the string in its compiled directory else it doesn't work at all. But since that filename changes often it is not usable at all. I tryed prepending all templates with a file (for example _init.php) and getting all translatable strings there which works but not for the use cases where i need to get same string translated in multiple languages in a single page - I would have to create separate variables. Does anyone have any idea which would help me work around my issue? Thanks
- 4 replies
-
- template engine
- string translation
-
(and 1 more)
Tagged with:
-
Quick Q: anybody knows PW core/module "process_html_template" function that does smth like below? It is quite simple and can be done in few lines of code. But if there is oppty not to invent bicycles, its better not to invent.) =================================================================== $text = "This page has id {id} and its parent title is {title}"; $array = ["id" => $page->id, "title" => $page->parent->title]; $rendered_text = some_func($text, $array); OR even better) $text = "This page has id {page.id} and its parent title is {page.parent.title}"; $rendered_text = some_func($text, $page);
-
Hi, I'm curious if anyone has implemented some sort of template ala twig, liquid, mustache, handlebars etc. so on and so forth? I noticed a blog post about blog themes which needed to be easier to work with than WP and using a simplified template syntax would definitely help for non-php-ers.
- 74 replies
-
- template engine
- twig
-
(and 8 more)
Tagged with: