Forums
This topic is locked
applying templates to multiple pages
Posted 19 Apr 2007 20:29:53
1
has voted
19 Apr 2007 20:29:53 renoz cafferata posted:
i created a photo album in Dreamweaver * i also created a template for it. i was successful in applying the template to the index page that has the thumb nail view but now how do i apply it to all the pages that have the full picture view? i would hate to do it one at a time i have over 400 pages. Replies
Replied 20 Apr 2007 02:00:53
20 Apr 2007 02:00:53 Kenneth Halley replied:
As far as I am aware you can't easily apply a template against previously created pages. You are really meant to work the other way round- create your template then generate your pages from it.
Having said that templates I think you could try retrospectively adding a template but only where the target page has all the same elelments as the template- in other words- lets say your template is based on three sections, a div called head, one called content, and one called footer, as long as your target page had these same three divs in the same order (and no other extraneous stuff) you might be abe to attach the file to a template.
I have tried this- in what would seem an altogetehr more probably way where I have had to detach a file from a template to remove a problem line from a particular page, then went back to reattach it- and it all went horribly wrong. I ended up with all sort sof mixed up tags and missing stuff- and had to start again. So be careful- keep backups.
Finally what you are trying to do is easier achieved with css- and where you have a common layout with similar divs/ids and classes you simply attach the new stylesheet and everything adopts the style.
HTH
-----------------------------------
www.halleynet.co.uk
Having said that templates I think you could try retrospectively adding a template but only where the target page has all the same elelments as the template- in other words- lets say your template is based on three sections, a div called head, one called content, and one called footer, as long as your target page had these same three divs in the same order (and no other extraneous stuff) you might be abe to attach the file to a template.
I have tried this- in what would seem an altogetehr more probably way where I have had to detach a file from a template to remove a problem line from a particular page, then went back to reattach it- and it all went horribly wrong. I ended up with all sort sof mixed up tags and missing stuff- and had to start again. So be careful- keep backups.
Finally what you are trying to do is easier achieved with css- and where you have a common layout with similar divs/ids and classes you simply attach the new stylesheet and everything adopts the style.
HTH
-----------------------------------
www.halleynet.co.uk
Replied 20 Apr 2007 06:27:58
20 Apr 2007 06:27:58 renoz cafferata replied:
I created my photo album with the photo album option on dreamweaver so i generated all the pages for me, any suggestions how to apply a style sheet or a template to all the pages that the photo album generated either before or after. thanks
Replied 20 Apr 2007 17:57:46
20 Apr 2007 17:57:46 renoz cafferata replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
As far as I am aware you can't easily apply a template against previously created pages. You are really meant to work the other way round- create your template then generate your pages from it.
Having said that templates I think you could try retrospectively adding a template but only where the target page has all the same elelments as the template- in other words- lets say your template is based on three sections, a div called head, one called content, and one called footer, as long as your target page had these same three divs in the same order (and no other extraneous stuff) you might be abe to attach the file to a template.
I have tried this- in what would seem an altogetehr more probably way where I have had to detach a file from a template to remove a problem line from a particular page, then went back to reattach it- and it all went horribly wrong. I ended up with all sort sof mixed up tags and missing stuff- and had to start again. So be careful- keep backups.
Finally what you are trying to do is easier achieved with css- and where you have a common layout with similar divs/ids and classes you simply attach the new stylesheet and everything adopts the style.
HTH
-----------------------------------
www.halleynet.co.uk
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
how do i apply css to multiple pages in dreamweaver with out going to each one at a time
As far as I am aware you can't easily apply a template against previously created pages. You are really meant to work the other way round- create your template then generate your pages from it.
Having said that templates I think you could try retrospectively adding a template but only where the target page has all the same elelments as the template- in other words- lets say your template is based on three sections, a div called head, one called content, and one called footer, as long as your target page had these same three divs in the same order (and no other extraneous stuff) you might be abe to attach the file to a template.
I have tried this- in what would seem an altogetehr more probably way where I have had to detach a file from a template to remove a problem line from a particular page, then went back to reattach it- and it all went horribly wrong. I ended up with all sort sof mixed up tags and missing stuff- and had to start again. So be careful- keep backups.
Finally what you are trying to do is easier achieved with css- and where you have a common layout with similar divs/ids and classes you simply attach the new stylesheet and everything adopts the style.
HTH
-----------------------------------
www.halleynet.co.uk
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
how do i apply css to multiple pages in dreamweaver with out going to each one at a time
Replied 22 Apr 2007 00:45:34
22 Apr 2007 00:45:34 Kenneth Halley replied:
Adding the css to multiple pages is pretty straightforward. Assuming you have some common and identifiable section in your <head> tag use find and replace to change <head> to <head><link.......>
do this in all your pages. Only problem really is you might not have any pointers in your files for the css to pick up on- div ids/classes. thats really more an issue with forward planning though. (not trying to be cheeky or smart)- but think you have come to the problem the wrong way round and now you have a lot of work. However clever use of find and replace might let you get some of the fixes sorted out- can't promise you would not need to edit files separately in the end though.
PS. Just did a quick run through creating one of these albums- Probably the easiest way is to creat a stylesheet and use it to style your table tags (and the tags nested within)- should be relatively easy to get a consistent look in no time this way. If your not sure on how to style a table- there are some useful sites out there:
www.timrivera.com/tests/csstables.html
veerle.duoh.com/index.php/blog/comments/a_css_styled_table/
HTH
-----------------------------------
www.halleynet.co.uk
do this in all your pages. Only problem really is you might not have any pointers in your files for the css to pick up on- div ids/classes. thats really more an issue with forward planning though. (not trying to be cheeky or smart)- but think you have come to the problem the wrong way round and now you have a lot of work. However clever use of find and replace might let you get some of the fixes sorted out- can't promise you would not need to edit files separately in the end though.
PS. Just did a quick run through creating one of these albums- Probably the easiest way is to creat a stylesheet and use it to style your table tags (and the tags nested within)- should be relatively easy to get a consistent look in no time this way. If your not sure on how to style a table- there are some useful sites out there:
www.timrivera.com/tests/csstables.html
veerle.duoh.com/index.php/blog/comments/a_css_styled_table/
HTH
-----------------------------------
www.halleynet.co.uk
Replied 22 Apr 2007 01:46:44
22 Apr 2007 01:46:44 Kenneth Halley replied:
In case it helps
Created a test gallery myself- and styled it - very basically- but in total took me no more than 10 mins.
This isn't going to win any style prizes but it might help you get started if your unsure.
1) Using the index page initially- create a new stylesheet and link it to the page- I called mines album.css and just dropped it in the same directory. You don't need to put anything in the sheet just yet if you don't want.
2)Copy the lines with :
<link href="album.css" rel="stylesheet" type="text/css">
</head>
And in Find and replace do
Find: </head>
Replace: <link href="../album.css" rel="stylesheet" type="text/css">
</head>
NOTE: I have added ../ to the css path
Run this on all the files in your pages directory- now they will all have a link to the stylesheet. Even with 400 files will only take seconds.
3) Add this code to your stylesheet
body {
background-color: #808066;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
tr {
font-size: 0.6em;
font-weight: bold;
}
h1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}
h2 {
font-size: 11px;
color: #FFFFFF;
}
h4 {
font-size: 10px;
text-align: center;
}
a:link {
color: #CCCCCC;
text-decoration: none;
}
a:visited {
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #676767;
color: #333333;
}
a:hover {
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #FFFF99;
border-top-width: 1px;
border-top-style: solid;
border-top-color: #FFFF99;
}
table {
background-color: #808066;
}
It ain't anything special and i only chose the colours based on the files I use to set up an example with, but it gives you something to play with and covers all the tags found in the pages and index file. You can obviously add background images, toall the pages to suit or could edit the pages to add greater ids or classes to get a better look, - depends how much work you want to give yourself.
HTH
<b></b>
-----------------------------------
www.halleynet.co.uk
Created a test gallery myself- and styled it - very basically- but in total took me no more than 10 mins.
This isn't going to win any style prizes but it might help you get started if your unsure.
1) Using the index page initially- create a new stylesheet and link it to the page- I called mines album.css and just dropped it in the same directory. You don't need to put anything in the sheet just yet if you don't want.
2)Copy the lines with :
<link href="album.css" rel="stylesheet" type="text/css">
</head>
And in Find and replace do
Find: </head>
Replace: <link href="../album.css" rel="stylesheet" type="text/css">
</head>
NOTE: I have added ../ to the css path
Run this on all the files in your pages directory- now they will all have a link to the stylesheet. Even with 400 files will only take seconds.
3) Add this code to your stylesheet
body {
background-color: #808066;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
tr {
font-size: 0.6em;
font-weight: bold;
}
h1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}
h2 {
font-size: 11px;
color: #FFFFFF;
}
h4 {
font-size: 10px;
text-align: center;
}
a:link {
color: #CCCCCC;
text-decoration: none;
}
a:visited {
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #676767;
color: #333333;
}
a:hover {
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #FFFF99;
border-top-width: 1px;
border-top-style: solid;
border-top-color: #FFFF99;
}
table {
background-color: #808066;
}
It ain't anything special and i only chose the colours based on the files I use to set up an example with, but it gives you something to play with and covers all the tags found in the pages and index file. You can obviously add background images, toall the pages to suit or could edit the pages to add greater ids or classes to get a better look, - depends how much work you want to give yourself.
HTH
<b></b>
-----------------------------------
www.halleynet.co.uk