Monday 11 July 2005 9:34:13 am
Hi, There is probably a simple solution here, but it is not obvious to me. I have used the following code in a pagelayout template to show a poll. It uses "attribute_view_gui" to show the results. The problem is with the line; {attribute_view_gui attribute=$poll_list[0].object.data_map.question} This gives the questions, but they are not in a column, one under the other, but just as one long string. How do I rdit the output of attribute_view_gui ?
{let poll_list=fetch( content, list,
hash( parent_node_id, 407,
sort_by, array( array( published, false() ) ),
limit, 1 ) )
}
<div>
<div>
{attribute_view_gui attribute=$poll_list[0].object.data_map.description}
</div>
<form method="post" action={"content/action"|ezurl}>
<fieldset>
<legend>vote now</legend>
<input type="hidden" name="ContentNodeID" value="{$poll_list[0].node_id}" />
<input type="hidden" name="ContentObjectID" value="{$poll_list[0].object.id}" />
<input type="hidden" name="ViewMode" value="full" />
<div>
{attribute_view_gui attribute=$poll_list[0].object.data_map.question}
</div>
{section show=is_unset( $versionview_mode )}
<input class="button" type="submit" name="ActionCollectInformation" value="Vote" />
{/section}
</fieldset>
</form>
<div>
<div class="attribute-link">
<p><a href={concat( "/content/collectedinfo/", $poll_list[0].node_id, "/" )|ezurl}>{"Result"|i18n("design/base")}</a></p>
</div>
</div>
</div>
{/let}
|