We have been using phpwslistings for a couple of weeks and if works well for our application. However we would like to display some additional formelements in cust_view_small.tpl. The content of the template follows:
<!-- BEGIN LISTING -->
<table border="0">
<tr valign="top">
<!-- BEGIN MAINIMAGE -->
<td>{MAINIMAGE}</td>
<!-- END MAINIMAGE -->
<!-- BEGIN BODY -->
<td>
<!-- BEGIN TITLE -->
<b>{TITLE}</b><br />
<!-- END TITLE -->
<!-- BEGIN FORMELEMENT1_LABEL -->
<b>{FORMELEMENT1_LABEL}</b>:
<!-- END FORMELEMENT1_LABEL -->
<!-- BEGIN FORMELEMENT1 -->
{FORMELEMENT1}<br /><br />
<!-- END FORMELEMENT1 -->
<!-- BEGIN FORMELEMENT2_LABEL -->
<b>{FORMELEMENT2_LABEL}</b>:
<!-- END FORMELEMENT2_LABEL -->
<!-- BEGIN FORMELEMENT2 -->
{FORMELEMENT2}<br /><br />
<!-- END FORMELEMENT2 -->
<!-- BEGIN READ_MORE -->
{READ_MORE}<br />
<!-- END READ_MORE -->
</td>
<!-- END BODY -->
</tr>
</table>
<!-- END LISTING -->
No matter what I do, phpwslistings appears to be ignoring any formelements and correponding labels. I can make changes to the {Title} tag and the change displays perfectly. For instance I can preface the title tag with <h3>Product: {TITLE}</h3> and it behaves as expected. Is there some special tage that needs to be used for listings as opposed to forms?
Any suggestions are appreciated.
Regards,
John.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My response is based upon the manner in which we are using phpwslistings - your template names may be different.
When you display featured listings or browse through your listings, the view_small.tpl or cust_view_small.tpl templates are used. If you look at the view_small.tpl file, you will notice the following definitions:
<!-- BEGIN FORMELEMENTS -->
{FORMELEMENTS}
<!-- END FORMELEMENTS -->
If you are not using the custom layout feature, phpwslistings will display those form elements whose Display On Browse switch is set to Yes. You can determine the form element's Display On Browse status under the Manage Form Elements function. If you don't want a particular form element to be displayed during the execution of the view_small.tpl or cust_view_small.tpl forms, turn off Display on Browse.
If you are using custom layouts, your cust_view_small.tpl may contain something along the lines of the following for your custom defined form elements:
<!-- BEGIN FORMELEMENTS -->
{FORMELEMENT2} - {FORMELEMENT3}<br />
{FORMELEMENT4}<br />
{FORMELEMENT5} {FORMELEMENT7}<br />
<!-- END FORMELEMENTS -->
The same Display On Browse rule applies regarding these form elements. If you want them to be displayed, make certain that the switch is set to Yes. I completely forgot about this switch and went around in circles for some time trying to figure out why formelements 2 and 3 were displaying properly, but the remaining we not. Once I changed their status to Display On Browse = Yes, everything worked as I expected I should.
Hope this help,
John.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We have been using phpwslistings for a couple of weeks and if works well for our application. However we would like to display some additional formelements in cust_view_small.tpl. The content of the template follows:
<!-- BEGIN LISTING -->
<table border="0">
<tr valign="top">
<!-- BEGIN MAINIMAGE -->
<td>{MAINIMAGE}</td>
<!-- END MAINIMAGE -->
<!-- BEGIN BODY -->
<td>
<!-- BEGIN TITLE -->
<b>{TITLE}</b><br />
<!-- END TITLE -->
<!-- BEGIN FORMELEMENT1_LABEL -->
<b>{FORMELEMENT1_LABEL}</b>:
<!-- END FORMELEMENT1_LABEL -->
<!-- BEGIN FORMELEMENT1 -->
{FORMELEMENT1}<br /><br />
<!-- END FORMELEMENT1 -->
<!-- BEGIN FORMELEMENT2_LABEL -->
<b>{FORMELEMENT2_LABEL}</b>:
<!-- END FORMELEMENT2_LABEL -->
<!-- BEGIN FORMELEMENT2 -->
{FORMELEMENT2}<br /><br />
<!-- END FORMELEMENT2 -->
<!-- BEGIN READ_MORE -->
{READ_MORE}<br />
<!-- END READ_MORE -->
</td>
<!-- END BODY -->
</tr>
</table>
<!-- END LISTING -->
No matter what I do, phpwslistings appears to be ignoring any formelements and correponding labels. I can make changes to the {Title} tag and the change displays perfectly. For instance I can preface the title tag with <h3>Product: {TITLE}</h3> and it behaves as expected. Is there some special tage that needs to be used for listings as opposed to forms?
Any suggestions are appreciated.
Regards,
John.
Ignore this message. I completely forgot that I needed to enable in browse view.
Can you explain "enable in browse" view? I have the same problem.
My response is based upon the manner in which we are using phpwslistings - your template names may be different.
When you display featured listings or browse through your listings, the view_small.tpl or cust_view_small.tpl templates are used. If you look at the view_small.tpl file, you will notice the following definitions:
<!-- BEGIN FORMELEMENTS -->
{FORMELEMENTS}
<!-- END FORMELEMENTS -->
If you are not using the custom layout feature, phpwslistings will display those form elements whose Display On Browse switch is set to Yes. You can determine the form element's Display On Browse status under the Manage Form Elements function. If you don't want a particular form element to be displayed during the execution of the view_small.tpl or cust_view_small.tpl forms, turn off Display on Browse.
If you are using custom layouts, your cust_view_small.tpl may contain something along the lines of the following for your custom defined form elements:
<!-- BEGIN FORMELEMENTS -->
{FORMELEMENT2} - {FORMELEMENT3}<br />
{FORMELEMENT4}<br />
{FORMELEMENT5} {FORMELEMENT7}<br />
<!-- END FORMELEMENTS -->
The same Display On Browse rule applies regarding these form elements. If you want them to be displayed, make certain that the switch is set to Yes. I completely forgot about this switch and went around in circles for some time trying to figure out why formelements 2 and 3 were displaying properly, but the remaining we not. Once I changed their status to Display On Browse = Yes, everything worked as I expected I should.
Hope this help,
John.