logo-dw

Go Back   Dreamweaver Club Forums > Dreamweaver forums > Spry
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 07-29-2011, 03:05 PM   #1
LisaLotty
 
Join Date: Feb 2011
Posts: 22
Default Adding Spry to Library

I want to add my spry menu bar to the library so I can change it from the library instead of individually on every page...But when I drag the spry menu into Library it looses all css formatting which is internal and at the top of my html file. How do I keep the css formatting?

Lisa
LisaLotty is offline   Reply With Quote
Old 07-30-2011, 08:44 PM   #2
DWcourse
DWcourse's Avatar
 
Join Date: Apr 2009
Posts: 3,276
Default

You're Spry CSS and Javascript should be in their own files in your SpryAssets folder. You'll need to link to those on every page where you want to use the menu.
__________________
If my answer helped, check out DWcourse.com for Dreamweaver tips and tutorials.
DWcourse is offline   Reply With Quote
Old 08-01-2011, 03:35 PM   #3
LisaLotty
 
Join Date: Feb 2011
Posts: 22
Default

The site that im working on is already set up and I have to work on this with no training, so I have found the folder called spryassets, but when I open the files sprymenubar.js and spryeffects.js, I don't understand all the java code.
All I want to do is edit the spry menu in one file then automatically change it in all the other 150 pages. Someone told me that I could do this in the library but the formatting disappears!?
LisaLotty is offline   Reply With Quote
Old 08-02-2011, 06:35 AM   #4
DWcourse
DWcourse's Avatar
 
Join Date: Apr 2009
Posts: 3,276
Default

Don't worry about the javascript files, you shouldn't ever need to edit them.

Editing a library item to update a number of pages only works if the menu was originally placed in the pages as a library item. When you edit a library item it updates only pages that already contain the item.

If the menu wasn't created and placed on the pages as a library item (or as part of a template) you'll have to edit each page individually. Of course you could make the menu a library item now and then add it to each page. That will take some time but at least you'd be ready for the next time you need to update it.

And don't worry about what the menu looks like in the library. It's appearance is dependent upon a CSS file attached to the pages. The library can't see the CSS and so it shows an unformatted list. As long as the page you drop the library item into is also linked to the spry javascript and css files (it should be if there was already a menu on the pages) it will look/work OK.
__________________
If my answer helped, check out DWcourse.com for Dreamweaver tips and tutorials.
DWcourse is offline   Reply With Quote
Old 08-03-2011, 12:53 PM   #5
LisaLotty
 
Join Date: Feb 2011
Posts: 22
Default

Ok I dragged the spry menu that is in it's final designed form within its sidebar div, from my html file into the library and it appears with no formatting. When I come to place the spry back on to the html page it has no formatting and is linked to the spry assets folder. This is not making sence!!!
LisaLotty is offline   Reply With Quote
Old 08-03-2011, 11:36 PM   #6
DWcourse
DWcourse's Avatar
 
Join Date: Apr 2009
Posts: 3,276
Default

Deleting a menubar also deletes the javascript and CSS links that look something like this:

Code:
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
You could probably make that a snippet as well and pull it into the head of your pages. You might need to use links relative to the site root if your pages are spread over different folders.
__________________
If my answer helped, check out DWcourse.com for Dreamweaver tips and tutorials.
DWcourse is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:54 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com