Page breaks

General ShopSite user discussion

Page breaks

Postby Gaspumpman » Tue Mar 26, 2013 12:12 pm

Is there any way to install a break in this page http://www.benfordfueling.com/shop/anothertestpage.html where "Parts Department" text is located now. I would like to separate the product category links from the Parts Department links with perhaps a blue bar like the menu bar at the top. The parts department text is currently generated under the Pump Accys page link in the Link Text.
Gaspumpman
 
Posts: 27
Joined: Thu Mar 14, 2013 11:30 am

Re: Page breaks

Postby Jim » Tue Mar 26, 2013 3:57 pm

Dividing items (page links or products) into different sections of a page would be done by having multiple [-- Loop Links --] or [-- Loop Products --] sections in the template. Typically this would be done by setting a VAR in the template and comparing that to one of the custom page/product fields of items assigned to the page. Only those items whose custom field contains the word would be inserted in the page.

There is probably some code in other forum posts that go into this in more depth but here is a section of a page template demonstrating the process. In this example I will use the extra page field 1 for the category.

[-- VAR.class "Product Categories" --]
put your section header here (i.e. [-- VAR.class --} would put Product Categories
[-- Loop Links --]
[-- Link --]
[-- End_loop Links --]

Put your divider bar here

[-- VAR.class "Parts Department" --]
put your section header here (i.e. [-- VAR.class --} would put Parts Department"
[-- Loop Links --]
[-- Link --]
[-- End_loop Links --]

In the[--DEFINE LINK_TO_PAGE--] section of the template you would have code something like this.

[-- IF VAR.class page.field1 --]
output your image and text for the page links
[-- END_IF --]

You can do as many sections as you need to. You might want to put a section with [-- VAR.class "" --] to catch any items that you might have forgotten to put a value in the page field1 text field. As I mentioned above this can also be done for products and even subproducts by using the appropriate values and template tags.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah


Return to User Forum

Who is online

Users browsing this forum: No registered users and 95 guests

cron