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

This is an archive of old posting to the User Forum

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

Postby Kristian » Tue Mar 19, 2002 3:19 pm

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
Kristian
 

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

Postby Jim Stavast » Tue Mar 19, 2002 4:04 pm

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
Jim Stavast
 

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

Postby Kristian » Tue Mar 19, 2002 5:18 pm

:)
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
Kristian
 


Return to User Forum Archive

Who is online

Users browsing this forum: No registered users and 8 guests