In a custom template you can have more than one section. You would
need to setup the extra page fields to indicate brand or state. In your
page template you would set a VAR to indicate which links you want
displayed in each location like this.
# this is where I want my brands displayed
[-- VAR.link_type "BRAND" --]
[-- Loop Links --]
[-- link --]
[-- END_Loop Links --]
# This is where I want the states
[-- VAR.link_type "STATES" --]
[-- Loop Links --]
[-- link --]
[-- END_Loop Links --]
In the [-- DEFINE LINK_TO_PAGE --] section of the template used to
display the links you would have something like this
[-- DEFINE LINK_TO_PAGE --]
[-- IF VAR.link_type PRODUCT.FIELD1 --]
# do whatever formatting is necessary to output the link when the value
# of VAR.link_type and product.field 1 match
[-- ELSE --]
# do what ever other formatting you might want to do if the values don't
# match. So this section could be blank if you don't want to do
# anything.
[-- END_IF --]
[-- END_DEFINE LINK_TO_PAGE --]
This is a very basic version so you will need to flesh it out to meet
your needs.
Jim
Craig wrote:
Hi,
This is my first post since I am new to Shopsite. I have used several
carts on my site that I have had online since 1999.
Here's my first question.
I want to filter some links for the front page and place them in
different locations on the page. I want to have a "Shop By Brand" area
on the page and a "Shop By State" area on the page.
I know how to do this using SQL but need some assistance to accomplish
this in Shopsite. By the way, does anyone know which database Shopsite
uses?
I am thinking of using one of the extra page fields for labeling a page
as a brand or a state. I would then use an IF statement to tell Shopsite
whether or not to display the link to the page.
Has anyone done this and be willing to share their code?
Thanks,
Craig Peterson