Miva Merchant 4 Module FAQs » Product Page Templates (BROK_PRODTEMPLATES )


{docurl}

Displaying Radio Options In Rows

Is it possible to display the radio options in rows? (2003/05/15)

This feature was added in version 4.63 (non compiled)/4.65c (compiled). There is now a template area, "Radio option row template", on the "attriubtes" tab for templates. In this field you can define a "row" template to be used to display the radio options in rows. This feature works similarly to other "row templates", for example, the category row template, found in this module. By default it displays them singly. To display two across, for example, change the %options% token in the Radio attr. template area to %rows%. Change the "Radio option row template" to:

<tr><td>%option|01|%</td><td>%option|02|%</td></tr>

And change the Radio option template to:

<table>
<tr><td valign="top">

%fields%
</td>
<td valign="top">
%prompt%
</td></tr>
</table>

By way of further explanation:

The row template defines a "row" of a table (if you will) while the option template defines what goes in each cell of that row. I.e. the contents of the option template are used to replace each %option|0x|% in the row template.

So if you had in your Radio attr. template:

<table>
%rows%
</table>

And in your "radio option row template":

<tr><td>%option|01|%</td><td>%option|02|%</td><td>%option|03|%</td></tr>

And in your "radio option template" (simplified obviously):

%prompt%

and you had 6 attributes with prompts Prompt1 through Prompt6 you woudl end up with the html:

<table>
<tr><td>Prompt1</td><td>Prompt2</td><td>Prompt3</td></tr>
<tr><td>Prompt6</td><td>Prompt5</td><td>Prompt6</td></tr>
</table>



Last update: 2003-07-29 20:49
Author: Support
Revision: 1.0

Print this record Send FAQ to a friend Show this as PDF file
Please rate this FAQ:

Average rating: 0 out of 5 (0 Votes )

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry

Records in this category