Page 1 of 1

Any way of getting [-- PAGE.columns --] to a number? - Custo

PostPosted: Tue Mar 19, 2002 3:19 pm
by Kristian
Any way of getting "One column" [-- PAGE.columns --] to the number "1" in
Custom page template?

Can the [-- IF --] be used with extended tests?
[-- IF PAGE.Colums eq "One culumn --]
.....


Thanks in adwance.
Kristian

Re: Any way of getting [-- PAGE.columns --] to a number? - C

PostPosted: Tue Mar 19, 2002 4:04 pm
by Jim Stavast
Here is an example for using the PAGE.columns to specify the number of
columns.
==================
<table width="100%" cellspacing="5">
[--LOOP PRODUCTS page.columns --]
<td valign=top align=left >
[--PRODUCT--]
</td>
[--END_LOOP PRODUCTS--]
</table>
==================

There is no "extended tests" comparison in custom templates like you show
below.
The only type of comparison that can be done is a test to see if a field has
a value.
For example [--IF page.text2 --] would be true if there is text in the text2
field but false if it is empty.
In the case of [--IF PAGE.columns --] it would always be true because it will
always contain one of the
dropdown list values e.g. One Column, Two columns etc.

If you need the actual number of columns for some purpose other than how it
is used in the code snippet above you could write a CALL routine that you
would pass the PAGE.columns field and have it return the actual number.

Jim Stavast


Kristian wrote:

Any way of getting "One column" [-- PAGE.columns --] to the number "1" in
Custom page template?

Can the [-- IF --] be used with extended tests?
[-- IF PAGE.Colums eq "One culumn --]
....

Thanks in adwance.
Kristian

Re: Any way of getting [-- PAGE.columns --] to a number? - C

PostPosted: Tue Mar 19, 2002 5:18 pm
by Kristian
:)
Thanks.


"Jim Stavast" <jstavast@shopsite.com> wrote in message
news:3C97B5D1.BCE66CE8@shopsite.com...
Here is an example for using the PAGE.columns to specify the number of
columns.
==================
table width="100%" cellspacing="5"
[--LOOP PRODUCTS page.columns --]
td valign=top align=left
[--PRODUCT--]
/td
[--END_LOOP PRODUCTS--]
/table
==================

There is no "extended tests" comparison in custom templates like you show
below.
The only type of comparison that can be done is a test to see if a field
has
a value.
For example [--IF page.text2 --] would be true if there is text in the
text2
field but false if it is empty.
In the case of [--IF PAGE.columns --] it would always be true because it
will
always contain one of the
dropdown list values e.g. One Column, Two columns etc.

If you need the actual number of columns for some purpose other than how
it
is used in the code snippet above you could write a CALL routine that you
would pass the PAGE.columns field and have it return the actual number.

Jim Stavast


Kristian wrote:

Any way of getting "One column" [-- PAGE.columns --] to the number "1"
in
Custom page template?

Can the [-- IF --] be used with extended tests?
[-- IF PAGE.Colums eq "One culumn --]
....

Thanks in adwance.
Kristian