-
☆ A M B ☆
- 427 Posts
Quote from: KBtechnics at Aug 15, 2008, 07:57 AM
Hi,
can I use $modx->parsechunk using a file as template instead of a chunk?
I tried to use the function call
$modx->parsechunk("@file:" . $modx->config['base_path']. $this->template_path . $filename, $fields_values_array, '[+', '+]')
but it returns FALSE.
Of course,
file_exists($modx->config['base_path']. $this->template_path . $filename) == TRUE
How can I do?
thx in advance
You may want to make a snippet
which could read the snippet call (the vars)
and then include an external file with php include()
In that file have the strings in place you ae going to insert into....
-
☆ A M B ☆
- 24,524 Posts
In the first place, the function is parseChunk. Case is important. In the second place, no, you cannot use it with a file, you can only use parseChunk with a chunk.