Part 2: DBase setup and category + detail pages
Finally I'm back... (had a holiday, slow client feedback...*-). So I think that this is the part from where this whole story becomes really interesting.
I've finished the DBase input and tha two main pages of the site: the product category and detailpage! Read on my friends...
So I had to wait some time before I got some real data to put in my DBase, cause else creating and testing pages just doesn't feel fine.
CATEGORY PAGE
In my design I used different colours for the different categories, so this was an important thin to consider building up the DBase. I mean ASP is there to make life simple and easy and , althoufh I am *not* a handcoder, I wanted to use that as much as possible :-)
So I created a Table "Categories" in which I put every item relative to the different categories. Everything: all images, texts, even hexcode RGB colours etc... are all put in that table.
On the ASP category page I made a bunch of dynamic data for the images, background colors for tabel cells etc... When you click in the navigation to browse a certain category, the "Category" recordset is then filtered with the Category ID variablewhich is send through the querystring (like "productcategory.asp?CategoryID=3" and automatically all the elements are set to the right colour.
About that querystring: I hardly ever use the standard MM Go to detail page behaviour! I almost always prefer to use a regular link (click on the "folder" icon in the property inspector, and I define the variables using the "parameters" button in the dialog box.
(Set the variable name to pass on the left and the value to add by clicking on the "lightning" icon and selct the datasource.)
I think it gives some more control...
The Product Recordset uses the Horizontal Looper 2 extension and shows all records sorted by ID so the latest added product is on top of page.
I had some troubles in the beginning cause i already created a table row that I wanted to be looped, but the behaviour got stuck a little in the HTML code. Then I found that I had to select just some elements without any table, tr, or td code; then apply the HL2 behaviour. Only then I started to layout a little bit. And it's cool now ;)
PRODUCT PAGE
On the category page I used the same method to create the links to the productdetail pages. I sent the CategoryId and the ProductID that filter out the 2 recordsets on that page: a Category and a Product.
(like "productcategory.asp?CategoryID=3&ProductID=45")
Doing so I maintain this whole site with 7 categories and some dozens of products with only two pages! I think that's really cool ;-)
And now it needed some finetuning for usability. With UD everything is dynamic and you should use this as much as possible.
E.g on all the images I set a dynamic ALT tag. Click with the mouse in the Property Inspector in the "ALT" field, then get your Data window next to it and select the text you want to be inserted to the ALT. Click on the "Bind" button in the bottom and select 'img.alt'.
You 'll see a bunch of other options that might open your eyes on how dynamic a site can be!!
In the next part, I'll discuss how I setup the "become member" stuff.
I really did some thinking and used UD and MM behaviours in a different way !...
That's it for today
e_site
Comments
Be the first to write a comment
You must me logged in to write a comment.