Thanks, I am trying to wrap my head around this...
In my design template I have a chunk in the sidebar called sidebarList with the following:
[!ShowList? &tv=`[*MyListTv*]` !]
I created a snippet called Showlist with the following:
<?php
/* at this point, the $tv variable will contain the options the user selected
separated by '||';
*/
/* display nothing it no items were checked */
if (empty($tv)) {
return '';
}
/* make an array out of the TV value */
$values = explode('||', $tv);
$output = '<ul>';
foreach($values as $value) {
$output .= '<li>' . $value . '</li>';
}
$output .= '</ul>';
return $output;
?>
I then created a TV called MyListTv that uses an Input Type set to "Textarea" and a Widget set to "Delimited List" with the Delimiter set to ||
I have connected this TV to my template.
In a test document I see the new TV there and I entered a test list like so:
When I go the parsed page in a browser I get this showing in the sidebar on the front end (actual page):
[[ShowList? &tv=`Apples||Oranges||Grapes` ]]
What I need is something like this showing in the browser:
Apples
Oranges
Grapes
I need markup to show like this so I custom style the <ul> and <li> myself.
<ul>
<li>Apples</li>
<li>Oranges</li>
<li>Grapes</li>
</ul>
Any ideas?
Thanks!