This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hey all,
I have a component twig string like so: {% component 'componentname' var1="something" var2="something" %}
I need to get the twig instance and render outside of the a view layer. (think a component rendering within a component from a twig function). For example - a huge block of text from Component A that has a [[component::componentname::componentvars]] string that needs to be replaced with component B.
From a static non-view instance I'm struggling to identify A ) the use classes needed to achieve this, and B ) the process to render. From what I can tell I have to load the lexer and then the parser...but the order, what cms classes, what vender classes to load ect really has me stuck.
Obviously this is not really documented in sum anywhere....
Any ideas appreciated.
ChadStrat
I'm not sure if this is still something you need help with but there is always App::make('twig.string')
that can be useful for rendering strings using Twig.
1-2 of 2