close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

How do I specify a default button when no file name is listed in the URL?

Thread began 3/12/2010 5:20 am by sandy170299 | Last modified 3/12/2010 4:39 pm by Jimmy Wu | 1969 views | 6 replies |

sandy170299

How do I specify a default button when no file name is listed in the URL?

For example, if someone types in the full URL WITH a file name, index.htm, the correct menu state shows. However, if someone just types in the URL without the file name, temple/, the buttons are all messed up. How can I specify a default page/button state if no file name is specified in the URL?

On the first two links are "real" right now..

Sign in to reply to this post

Jimmy Wu

What you can do is to use mod_rewrite to rewrite the url that is typed in without the index.htm to have the index.htm. Here is a tutorial on how to do that:
mod_rewrite

Sign in to reply to this post

sandy170299

I don't have access to the server. Is this something that can be done through code?

Sign in to reply to this post

sandy170299

Jimmy, are you saying that I would have to do some monkeying around with every menu I create with CSS menu writer in order to get a default button to appear selected if no page is specified in the URL? Shouldn't that be automatic, through a setting or something?

Sign in to reply to this post

Jimmy Wu

The way that the current highlight works is by comparing the current page url with the urls in the menu and if it matches, then the url gets highlighted. If it matches with more than one menu item, they'll both be matched. Therefore, you will have to get the url to display correctly so the current state will work correctly.

Sign in to reply to this post

sandy170299

Is this feature that you may be adding in the future? Most times (I see it all the time), people will just type in a URL instead of getting to a site by clicking on a specific link. This would potentially cause issues with all of the CSS Menus, right?

I would really like to see this be an option for future releases of this product. In the meantime, I think I'll have to use another option, unfortunately.

Sign in to reply to this post

Jimmy Wu

The script can't determine that the domain/ and domain/index.htm are not the same. You can set up an htaccess file to do the mod_rewrite or contact your service provider and they will have a way for you to accomplish this. The link I provided in the first response has instructions on how to create the htaccess file.

Sign in to reply to this post

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...