Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Creating and using Library items

From: Creating a First Web Site with Dreamweaver CS4

Video: Creating and using Library items

CSS really allows you the ability to have your design exist in one place and have it affect multiple pages, just like this Janedoe.css affects these multiple pages and applies that style to it. But what if you want to do something similar with content? So if I have to say for instance, this navigation, what if I want this navigation to appear across multiple pages and still have one reference of the navigation? Well, I can easily do that, converting this into a library item.

Creating and using Library items

CSS really allows you the ability to have your design exist in one place and have it affect multiple pages, just like this Janedoe.css affects these multiple pages and applies that style to it. But what if you want to do something similar with content? So if I have to say for instance, this navigation, what if I want this navigation to appear across multiple pages and still have one reference of the navigation? Well, I can easily do that, converting this into a library item.

So I'm going to do that by going to Window, down to Assets, because in the Assets panel, that's where Library items exist. So that's going to be pressed and what I want to do is I want to just select this navigation and I want to drag it to the Assets panel. I'll show you what happens when I'm going to do that. I drag it in there to turn it into an asset. I get this dialog box from Dreamweaver that says, "Dreamweaver stores library items in the root folder of a site, but there is no site associated with this document.

Please add a site, or save it into an existing site." So I need to define a site before I can make a library item. So, I'm going to do that by clicking Manage Sites, and from here I'm going to click New Site. Then I get this Site Definition Wizard. It's that basic format for making a site. It really asks me, what you would like to name your site? Well, I want to call it Jane Doe Library, because that's what I'm going to make just to show you library items.

I'm going to click Next. It's asks, do you want to use a sort of server technology such as ColdFusion, some of these others? I'm going to select No now, but if I want to take advantage of other technologies, I can do that and I can always change that later. For now, I'm just going to select No. The next step is, how do you want to work through files for development? Well, I want to edit local copies, and then upload them when I'm ready, and really this field is the biggest field that I want to pay attention to, which is where on your computer do you want to store your files? So, if I click that folder, I can go in and define the folder where I want my site to exist.

So, Chapter 05, the 01 Begin folder is where I'm going to define. I'm going to click to Choose and I'm going to click Next and then it asks me, how do you want to connect to your remote server? Well, I want to select None, because I'm not going to worry about uploading now. So, all I want to do is create this library item and have this library exist across multiple pages. I'm going to click Next. It gives me a summary. Everything looks good. I can click on Done and it appears in this Manage Sites list, right here. Jane Doe Library.

Now that I have a site defined, I can click Done. Now what I can do is I can click on the Assets panel, I can select My Navigation and click and drag it over into my Assets panel with confidence, knowing that it's not going to give me that same dialog box. It tells me that the selection may not look the same when it's placed in other documents, because the Style Sheet information is not copied with it. So the Style Sheet information is separate. Again it's in Janedoe.css. It's just copying the content over, which is exactly what I want.

In fact, I can even say hey, don't warn me about this again because I'm totally aware of it now. Assets panel automatically highlights the title, which I want to call Nav. Hit Return and here is my item. So, as you can tell by this preview, it shows me that there is no style associated with this library item. It's just the text, but that's exactly what I want. In fact, look what it does in my Index HTML page. It highlights it, as if it's highlighter if you will.

That might be a little concerning initially, but if I save my file, and just preview in a browser, I know that it's not really there. Don't worry about that highlighting. It just identifies it as a library item. In fact if I go to Split View, you can see that it does the same highlighting on the code in here. So I find that very helpful, sort of defining what a library item is, and sure enough if I select it, it will even tell me it's a library item in the Properties panel.

So now it's now setup as a library item. It's looking good. I can go to say for instance My About page, delete that Nav, it goes here, text and replace it by just clicking and dragging that Nav library item to that page just like that. Notice how it does left justify it. Well I can change that because in my Properties panel. It's because I have the Paragraph format associated with that library item. So I'm going to select None and that will center that. So it's looking good.

I can save this page, move on down the line to the Portfolio page right in here, click and drag my Nav library item and go to my Properties panel and choose the format to None, so it centers that content. I'll save this page and my last page is the Contact page. So I could again make room for it, click and drag it into that page and remove any sort of formatting that's making it left justified.

That's looking pretty good. I'll save this page and sure enough, my navigation is across all the pages. And if I want to change this navigation, all I have to do is double-click that asset and I can change this to Contact Us, and once I save this library item, it asks me, hey do you want to update all of these various files that use these library item? Of course I do, because that's why I made it a library item.

I'm going to click Update, and it goes through lightening fast, and updates all the library items, so I can click Close. But if I go to those other pages, you could see that it says Contact Us across the board. So, again anytime you make a change in the library item such as even removing that word again and saving it, it's going to ask you to update it wherever it exists throughout your entire site. Close and sure enough, it just says Contact again.

So, I'll just save these pages one last time and then go ahead and preview this in a browser and you can see that my navigation is consistent across all of the pages. So, very powerful. It's similar to CSS you could say, in that CSS separates that style and really that style affects multiple pages. In this case, I have my content that exists in a separate file, that is on multiple pages, and the whole idea of changing it once will change it in all instances is really powerful and really makes my workflow efficient.

Show transcript

This video is part of

Image for Creating a First Web Site with Dreamweaver CS4
Creating a First Web Site with Dreamweaver CS4

32 video lessons · 51556 viewers

Paul Trani
Author

 

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now "Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Creating a First Web Site with Dreamweaver CS4.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.