Is it possible to use a tv that is a rich text area for a snippet parameter?
My following snippet works when I pass a plain text tv:
SNIPPET
<?php
$copy = isset($copy) ? $copy : ’’;
// Allow <img> and <a>
$output = strip_tags($copy, ’<img><a>’);
return $output;
?>
When I pass a rich text area like this: [!removeSpaces? ©=`[*rightcolumn*]`]]
It actually prints out the snippet call and then passes the tv:
[[removeSpaces? ©=`
`]]
I can see 2 things which look out of whack:
1. looks like you have mismatched the snippet start and end tags - [! ... ]]
2. I think there is an issue with using params which would equal to an html entity, so change © to something else.
Thanks for pointing them out but there not the cause of the problem.
The snippet is actually printing out:
[[removeSpaces? &right=`
****tv prints out here and has not been parsed by snippet as it still contains tags other than <a> and <img>*****
`]]
I can get it to work with plain text tvs. The only thing I can think of is you cannot use a rich text area as a tv snippet parameter. Can anyone let me know if this is the case?
Snippet call:
[[removeSpaces? &right=`[*rightcolumn*]`]]
Snippet:
<?php
$right = isset($right) ? $right : ’’;
// Allow <img> and <a>
$output = strip_tags($right, ’<img><a>’);
return $output;
?>