close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Category Titles

Thread began 8/30/2009 2:09 am by denise234045 | Last modified 2/17/2010 6:56 pm by iggymak198560 | 3680 views | 28 replies |

denise234045

Category Titles

Sorry for the multiple posts -

I would like to have each Category name posted at the top of each of the product results pages, instead of just the static "Product List". I'm going to have quite a few products and would really like it to be as user friendly as possible. I don't want folks to get lost and not know what section they're in...

Thanks ahead.

Sign in to reply to this post

Eric Mittman

The category results page is just a results page for a search and does not actually change for the various products. Are you talking about displaying the category for a product on the product detail page? If so you will need to get the category name for the product you are working with. If you add in an advanced recordset with this query you should get the category for the current item:

SELECT products.ProductName AS 'name', productcategories.CategoryName AS 'category'
From products, productcategories
WHERE products.ProductCategoryID = productcategories.CategoryID AND Products.ProductID =

For the ProductID portion you will need to specify your own SQL parameter and set it's value to the form value for ProductID

Sign in to reply to this post

denise234045

Category ID's on Product List Pages

I don't want the product id's listed at the top of the page - just the category id's. - so that when a user clicks on a category - the product results page has the name of the category at the top of the page.


So - instead of a page just saying "Product List" - I would like it to say "Pencil Sharpeners," which is one of my product categories. If the query produces no results, then the default is fine....

Sorry - I really am only familiar with php... and don't know what I'm doing.

Thanks for your time.

Sign in to reply to this post

Eric Mittman

Ok, that clears it up a bit. To get the name of the category to show when a particular category is chosen you will need to do the following on the product results page:

First you will need to create a new recordset and call it categories. In the simple recordset view you will select all columns from the productcategories table. You will need to filter the recordset on the CategoryID = to the URL parameter CategoryID.

Next you will need to locate the display of the Product List text it should look like this:

php:
Product List<br />



You will need to update it to be like this:

php:
<?php if ($totalRows_categories 0) { // Show if recordset not empty ?><?php echo $row_categories['CategoryName']; ?><br/>

      <?php }else{ ?>Product List<br />
      <?php ?>



I think this will get you the result you are looking for. I'm including a screen shot of the categories recordset screen as a reference.

Sign in to reply to this post

denise234045

Thanks Eric - this is leading me to another problem, which I guess I can no longer ignore....My site is connected to the database fine and its working well - but the recordset through dreamweaver is showing as empty, so something is not set up properly within dw... in the MySQL Connection pop-up I have

Connection Name:localhost
MySQL server:localhost

Usrnm, pw and db name are correct, but I'm getting a 404 error code saying that possible reasons include that there is no db running on the server - or the testing server specified for this site does not map to the http:..... URL. Please verify the URL Prefix maps to the root of the site.

Yet - the site is working fine.....

I guess I could change the recordset using phpmyadmin - but I think I need to figure this out as I move forward.

Thanks again for helping me work out the kinks in my knowledge- the site is turning out very nicely indeed.

Sign in to reply to this post

Eric Mittman

This type of 404 error can occur sometimes if the connection in DW is corrupted or not working correctly. One thing that you could try to do while DW is closed is to open the site root and find the _mmServerScripts folder. Copy this folder to a different location on your hard drive and delete the copy that is in your site folder, then open DW and attempt to interact with the recordset. There are some recordsets within the PowerStore that are there by default that you will not be able to edit due to their complexity, but you should be able to edit any recordset that you have created. If you still have problems with it you may need to delete the recordset and start over again with it.

Sign in to reply to this post

denise234045

Connecting to DB

I'm afraid I'm doing something terribly wrong. I did as instructed, to no avail.

I can't connect to the database with dreamweaver at all - so its not allowing me to create a recordset?? I cannot select a table, no columns are found, etc. and I'm not allowed to edit of course....

I know I'm being awfully thick on this - I'm probably overlooking something simple, but have no idea what that might be.

Sign in to reply to this post

Eric Mittman

That seems odd that DW is not allowing you to connect to the db. As another test you can try creating a new site and define it the same as your other site but with different locations for the files. In this new site create a new page and save it then attempt to create a connection to the db.

This test should let you know if the issue is one with the site you are working in or a larger issue with Dreamweaver.

Sign in to reply to this post

denise234045

I wasn't able to connect doing as you suggested either. But come to think of it - I had purchased WA mySQL tutorial and wasn't able to make a connection with Query Browser either - I posted problem, and in the end got a response of "I can't help you on that - never heard of that"... or something along those lines, so I put it aside. Could it be something to do with my computer?? Or should I contact the host???

I'll probably research all of the above - but if you have any suggestions....

Sign in to reply to this post

Eric Mittman

In general if you are having problems making a connection more than one environment it would indicate an issue with the connection details for the server itself. When you attempt to connect with a GUI tool other than in Dreamweaver what is the specific error message you get?

Is the connection a local one or to your hosted db? It is very common for host to restrict access to the db remotely. If this is the case I think you best bet would be to have a local MySQL server running. Please post back with what you discover and we will gladly help to guide you in the rite direction.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...