Dreamweaver Club Forums

Dreamweaver Club Forums (http://www.dreamweaverclub.com/forum//index.php)
-   Spry (http://www.dreamweaverclub.com/forum//forumdisplay.php?f=189)
-   -   Adding Spry to Library (http://www.dreamweaverclub.com/forum//showthread.php?t=41330)

LisaLotty 07-29-2011 03:05 PM

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?


DWcourse 07-30-2011 08:44 PM

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.

LisaLotty 08-01-2011 03:35 PM

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!?

DWcourse 08-02-2011 06:35 AM

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.

LisaLotty 08-03-2011 12:53 PM

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

DWcourse 08-03-2011 11:36 PM

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


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

All times are GMT. The time now is 05:08 AM.

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