Page Template Problems

Questions and answers about ShopSite Custom Templates

Page Template Problems

Postby old dog » Sat Jul 28, 2012 2:39 pm

Our site is an old frames based design @ http://www.swainsinc.com/ that I have been trying to convert to html/css. We just were updated to manager 11sp2r1 and I cannot get my NewTestPage to display as I designed. Right now I have modified the frames site to reflect the changes I anticipate on http://www.swainsinc.com/store/newTestPage.php. I uploaded StyleNewWork.css to Publish Files and Includes Files and also included it as part of the template, being sure to add a space before any # so ShopSite will recognize them.
My question is that the background, button, and header images related to the design do not display and I thought my links were OK, but Shopsite is changing them to a store/images path, what am I doing wrong? Is it just a file structure problem or what? I have been over the tutorials many times, so I must be missing something. My goal is to use the NewWebsiteTemplate on the Storefront page so all the secondary pages will render in the main content cell leaving the background image, header, menu, left navigation, and footer the same.
Obviously, I do not want to make live changes to the website until the test page is perfect. I am frustrated with ShopSite and would appreciate any hints you can provide.
Thanks, old dog
old dog
 
Posts: 4
Joined: Sat Jul 28, 2012 1:52 pm

Re: Page Template Problems

Postby Jim » Sat Jul 28, 2012 6:40 pm

I'm not sure what all problems are on the page but here are a few that I notice.

You have a <td width="15%" background "store/rightSidebarSlice.png" repeat="y" valign="top"> just after a <div id="sidebar2"> but there is no table for the td to be in. Different browsers react differently to this situations, some won't display it at all others will put the content at the top or bottom of the page. So you either need to change that <td... to a div or make a table for it to be in.

ShopSite will always reference links and images based on the authorized url for the store which should be where your pages are published. Images will always be referenced off of the media directory which is a directory at the authorized url level. It appears your authorized url is http://www.swainsinc.com/store so that is where all html pages will be placed at publish time. All images will be in http://www.swainsinc.com/store/media. You may have subdirectoriess under the /store if those are specified in the file name for the page / moreinfo page and you have created those directories. You may also have subdirectories of /store/media which can be created in the Images section of the backoffice.

You have multiple <head> ... </head> sections , mutiple <html>...</html> multiple <body> ...</body> sections in the page source of http://www.swainsinc.com/store/newTestPage.php

Hopefully that will give you some places to look for fixing the issues.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Page Template Problems

Postby old dog » Sat Jul 28, 2012 7:34 pm

Jim:
Thanks for the prompt reply. The page in question is the NewTestPage using the NewWebsite Template. I will fix the issues you have pinpointed and see what happens. I appreciate the help.
Found my link errors and the NewTestPage looks as I wanted. When I change the Storefront page to this template, will the loops for the content area automatically appear? I hard coded the menu and navigation, should I just replace that code in the template with loop links like:
<ul class="links">
[--Loop Links--]
<li>[--Link--]</li>
[--End_Loop Links--]
</ul>
Or is there a way to know what to hard code so the pages will appear in the correct cell?

Regards, old dog
old dog
 
Posts: 4
Joined: Sat Jul 28, 2012 1:52 pm

Re: Page Template Problems

Postby Jim » Sun Jul 29, 2012 2:14 pm

There are 2 ways you can do the menus and navigation.

Using the [-- Loop Links --] method will allow different sets of links links on different pages. The Links are configured by the pages that are assigned to the page and the order of the links can vary depending on you you set the sort options. You just insert the [-- Loop links --] ... [-- end_loop links --] code in the template where you want the links to appear on the page. This type of navigation is limited to pages defined in the Pages section of the backoffice. It can't be used on moreinfo pages, search, shopping cart etc.

The second method is to use the global Navigation method add in ShopSite 10 sp1. This is found under Preferences > Navigation in the backoffice. You can configure upto 4 different sets of links for Top Menu, which can have multiple levels, Left, Right and Bottom links each of which can have 2 levels. You have to manually configure what links are in each section but once set the same links will appear on all pages where the template tag for the particular set of links is used. For the top menu navigation you use the template tag [-- PageMenu {CSS, no_jscript} --] and for the left, right or bottom you use the tag [-- PAGELINKS {Left/Right/Footer} --]. This type of navigation can be used on any ShopSite generated page, moreinfo page, search, shopping cart etc.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Page Template Problems

Postby old dog » Sun Jul 29, 2012 5:55 pm

Jim:
Thanks for the menu loop clarification, it looks like the second method will work the best for me as long as it does not foul up my custom buttons. I will work on the template this week and see what happens.
I appreciate your help. Regards, old dog
old dog
 
Posts: 4
Joined: Sat Jul 28, 2012 1:52 pm

Re: Page Template Problems

Postby Kapitol » Mon Jul 30, 2012 3:34 pm

Being that shopsite is built so that business owners who do not consider themselves developers can quickly turn out a functioning website, using their template codes is probably the best idea.

My approach to solve this same problem was I also hard coded a menu and just dropped it into an include file and named it main_header, then in template files which contain information and store items I used the [-- INCLUDE main_header PROCESS --] in the place I need the header/menu to appear in my HTML structure. I used the same idea for the footer.

If you are also hard-coding anything else be sure to use [-- OUTPUT_DIRECTORY_URL --] in place of http://www.swainsinc.com/store -- this solves the problem of pages being in different directories and still being accessible. So accessing anything in the media folder will would now be, [-- OUTPUT_DIRECTORY_URL --]/media/imagename.jpg

Using [-- OUTPUT_DIRECTORY_URL --] creates one problem with your SSL. The only solution I know of is to use hard-coded links with an added "s" after http. = https:// - An example would be linking your stylesheet into a page with SSL.

Just some ideas to consider. Jim's solutions are usually the best.
Kapitol
 
Posts: 52
Joined: Mon May 14, 2012 10:26 pm

Re: Page Template Problems

Postby old dog » Mon Jul 30, 2012 10:08 pm

Kapitol:
Thanks for the good tips. I already have some includes and am just trying to keep my menu and navigation the way I designed it for the customer. I appreciate your input and will put it to good use.
old dog
old dog
 
Posts: 4
Joined: Sat Jul 28, 2012 1:52 pm


Return to Custom Template Questions

Who is online

Users browsing this forum: No registered users and 17 guests

cron