Search the FirstSpirit Knowledge Base
Is it possible to specify the output channel that a format template uses when rendered?
Specifically, I want to render the output of a format template's HTML channel into the output of an XML channel.
Hello,
I'm not sure, if I understand your question.
Do you need the content of the format template's HTML-Tab inside the XML-Tab or do you want to use the format templates also in the XML-Tab?
Maybe you could explain your functional requirements, to make it easier to understand the question?
Best regards
Michaela
Michaela Pahl wrote:
…do you want to use the (HTML) format templates also in the XML-Tab??
That's it precisely.
I have one page template that contains an XML output channel I need to use, and one format template that contains an HTML output channel that I'd like to use.
I want to do something like this:
$CMS_RENDER(template:"ft_pretty_date", channel:"HTML", ugly_date:_ugly_date)$
And call that within the XML channel of the page template.
Oh wait! I made it work by changing this:
$CMS_RENDER(script:"sc_new_thing", field:"new_thing_s", value:_new_thing)$
To this:
$CMS_RENDER(script:"sc_new_thing", field:"new_thing_s", value:_new_thing.toString)$
And now all is well. Thanks for your help!