Ask a Question related to Macromedia Dynamic HTML, Design and Development.
-
TSemmes #1
Converting templates to include SSI
I manage a site using Dreamweaver 7.0 (win). I created a template file that is
used for most of the pages on the site. I would like now to replace the header
and footer tables that appear on every page with SSI so when something on
those change I don't have to upload every file on the site. (You can see the
site I am working on at [url]http://www.svunet.org[/url]. and the new template file I am
creating at [url]http://www.svunet.org/newtemplate.shtml[/url]
What is the best way of doing this? It seems that the template is no longer
serves a purpose so I suppose that I should just open every page, copy the
table that is specific to the page and paste it into a new .SHTML file that
includes the SSIs. Even if I keep the existing template, replace the existing
headers and footers with SSI, and apply it to every page I will still have to
go to every file and change the extension from .htm to .shtml. Am I missing an
easier way to do this? Any advice will be appreciated. Thank you.
TSemmes Guest
-
Templates vs. Include files
I build websites using dynamic web templates and it really works for me. Now, I have a client asking why we should do that over using include files?... -
Libraries, Templates, Nested Templates, Repeat Regions,
Hi I have eight categories to display in my site navigation. Each category has at least one (some have two) levels of subcategories. For example... -
Templates with include files
Hey guys!!! I have a question. I know it's not that much related to this forum but I am having a bit of a problem. I created 3 files that I am... -
Strange Include problems: Repeat regions will Not workwith include file
I have a strange problem. I have an Index.asp page and on that page I have a poll that is displays. This poll is located in a sub folder, so to call... -
#26259 [Opn->Bgs]: relative include path not working with include() from shell command line execut
ID: 26259 Updated by: iliaa@php.net Reported By: orsaini at allainet dot com -Status: Open +Status: ... -
Murray *ACE* #2
Re: Converting templates to include SSI
Create the includes. Replace the content with the includes in the Template
page. Let this update all your pages. Upload them all, along with the
included files.
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
[url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
[url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
[url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
[url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
==================
"TSemmes" <webforumsuser@macromedia.com> wrote in message
news:dvuovc$jbk$1@forums.macromedia.com...>I manage a site using Dreamweaver 7.0 (win). I created a template file that
>is
> used for most of the pages on the site. I would like now to replace the
> header
> and footer tables that appear on every page with SSI so when something
> on
> those change I don't have to upload every file on the site. (You can see
> the
> site I am working on at [url]http://www.svunet.org[/url]. and the new template file I
> am
> creating at [url]http://www.svunet.org/newtemplate.shtml[/url]
>
> What is the best way of doing this? It seems that the template is no
> longer
> serves a purpose so I suppose that I should just open every page, copy the
> table that is specific to the page and paste it into a new .SHTML file
> that
> includes the SSIs. Even if I keep the existing template, replace the
> existing
> headers and footers with SSI, and apply it to every page I will still have
> to
> go to every file and change the extension from .htm to .shtml. Am I
> missing an
> easier way to do this? Any advice will be appreciated. Thank you.
>
>
Murray *ACE* Guest
-
TSemmes #3
Re: Converting templates to include SSI
Murray
I tried what doing what you said and it isn't working. Can SSI work with
Dreamweaver templates? It seems not becasue I am though I can view SSI in a
non-template file: [url]http://www.svunet.org/newtemplate.shtml[/url]
I can't view it in a template-generated file:
[url]http://www.svunet.org/about/bylaws.html[/url]. Even when I change the extension to
..shtml [url]http://www.svunet.org/about/bylaws.shtml[/url] though having to do so would
defeat some of the purpose of having a template since I would have to manually
have to edit the extension on each file. Is what I am trying to do impossible
or am I doing something wrong?
Tom
TSemmes Guest
-
Murray *ACE* #4
Re: Converting templates to include SSI
> Murray
If it doesn't then I am definitely drinking too much. Sure it does.> I tried what doing what you said and it isn't working. Can SSI work with
> Dreamweaver templates?
The file has to have an extension that triggers a server parse. Otherwise> I can't view it in a template-generated file:
> [url]http://www.svunet.org/about/bylaws.html[/url].
the server will never know that it has an include directive in there.
Huh?> since I would have to manually
> have to edit the extension on each file.
What is the name of your Template, please?
And show me the include line's code that is in
[url]http://www.svunet.org/about/bylaws.shtml[/url] please.
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
[url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
[url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
[url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
[url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
==================
"TSemmes" <webforumsuser@macromedia.com> wrote in message
news:e018am$pn$1@forums.macromedia.com...> Murray
> I tried what doing what you said and it isn't working. Can SSI work with
> Dreamweaver templates? It seems not becasue I am though I can view SSI
> in a
> non-template file: [url]http://www.svunet.org/newtemplate.shtml[/url]
>
> I can't view it in a template-generated file:
> [url]http://www.svunet.org/about/bylaws.html[/url]. Even when I change the extension
> to
> .shtml [url]http://www.svunet.org/about/bylaws.shtml[/url] though having to do so
> would
> defeat some of the purpose of having a template since I would have to
> manually
> have to edit the extension on each file. Is what I am trying to do
> impossible
> or am I doing something wrong?
>
> Tom
>
Murray *ACE* Guest
-
TSemmes #5
Re: Converting templates to include SSI
This is the template: [url]http://www.svunet.org/Templates/generic.dwt[/url]
This is the code from the bylaws.shtml up to the first include:
<html><!-- #BeginTemplate "/Templates/generic.dwt" --><!-- DW6 -->
<head>
<!-- #BeginEditable "doctitle" -->
<title>About SVU: Bylaws</title>
<!-- #EndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../svustyle-new.css" rel="stylesheet" type="text/css">
</head>
<body
onResize="P7_Snap('link1','closer',0,0,'link1','Ev ents',0,0);P7_ReDoIt()">
<!--#include file="../navbar.ssi" -->
and this is the last few lines of code that includeds the footer SSI:
<!--#include file="../footer.ssi" -->
</body>
<!-- #EndTemplate --></htm
l>
What I meant about "manually having to edit the extension on each file" was
that to make this work I will have to rename every file in the site from *.htm
to *.shtml to make the SSI work. ISn't that correct?
Tom
TSemmes Guest
-
Murray *ACE* #6
Re: Converting templates to include SSI
> ISn't that correct?
Yes. The alternative would be for you to ask your host to enable server
parsing for all file extensions. Some will and some won't. Those who won't
aren't worth continuing to support.
Also, if you have this link in your template file -
<body
onResize="P7_Snap('link1','closer',0,0,'link1','Ev ents',0,0);P7_ReDoIt()">
<!--#include file="../navbar.ssi" -->
then you really cannot have that same link in your child page -
Since DW would manage that link. You could try changing those links to> <body
> onResize="P7_Snap('link1','closer',0,0,'link1','Ev ents',0,0);P7_ReDoIt()">
> <!--#include file="../navbar.ssi" -->
virtual ones -
<body
onResize="P7_Snap('link1','closer',0,0,'link1','Ev ents',0,0);P7_ReDoIt()">
<!--#include virtual="/navbar.ssi" -->
in which case, they would not need to be managed.
Finally, you have a huge chunk of javascript in your navbar.ssi file.
That's not best practice. The javascript needs to be in the file doing the
include, not in the include file.
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
[url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
[url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
[url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
[url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
==================
"TSemmes" <webforumsuser@macromedia.com> wrote in message
news:e01epg$9hi$1@forums.macromedia.com...> This is the template: [url]http://www.svunet.org/Templates/generic.dwt[/url]
>
> This is the code from the bylaws.shtml up to the first include:
>
> <html><!-- #BeginTemplate "/Templates/generic.dwt" --><!-- DW6 -->
> <head>
> <!-- #BeginEditable "doctitle" -->
> <title>About SVU: Bylaws</title>
> <!-- #EndEditable -->
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> <link href="../svustyle-new.css" rel="stylesheet" type="text/css">
> </head>
> <body
> onResize="P7_Snap('link1','closer',0,0,'link1','Ev ents',0,0);P7_ReDoIt()">
> <!--#include file="../navbar.ssi" -->
>
> and this is the last few lines of code that includeds the footer SSI:
>
> <!--#include file="../footer.ssi" -->
> </body>
> <!-- #EndTemplate --></htm
> l>
>
> What I meant about "manually having to edit the extension on each file"
> was
> that to make this work I will have to rename every file in the site from
> *.htm
> to *.shtml to make the SSI work. ISn't that correct?
>
> Tom
>
Murray *ACE* Guest
-
TSemmes #7
Re: Converting templates to include SSI
Thank you Murray! The suggestion about using a virtual link worked!
I haven't tried yet moving the javascript from the SSI file to the template
file. I thought that since the javascript made the links on the navigation bar
work they should be in the SSI file with it. The drop downs seem to work but i
could try it with the javascript in the template file.
I didn't understand your comment about the link in the template file also
being in the child file. Isn"t that the way it is supposed to work with the
coding from the template file copying to the child file? maybe i don"t
understnad what you mean by child file. Anyway it seems to work. Much
appreciated!
TSemmes Guest
-
Murray *ACE* #8
Re: Converting templates to include SSI
Since template files are in the Templates folder, every link in them should
be like this -
<img src="../images/whatever
or this -
<img src="/images/whatever
or this -
<img src="http://www.example.com/images/whatever
If they are like the former, then they will be managed by DW - in other
words, when you spawn a child from the template, and save it in the ROOT of
the site, that same link will be manged to reflect the location, i.e.,
<img src="images/whatever
See what I mean?
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
[url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
[url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
[url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
[url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
==================
"TSemmes" <webforumsuser@macromedia.com> wrote in message
news:e01n7i$k9m$1@forums.macromedia.com...> Thank you Murray! The suggestion about using a virtual link worked!
> I haven't tried yet moving the javascript from the SSI file to the
> template
> file. I thought that since the javascript made the links on the navigation
> bar
> work they should be in the SSI file with it. The drop downs seem to work
> but i
> could try it with the javascript in the template file.
> I didn't understand your comment about the link in the template file also
> being in the child file. Isn"t that the way it is supposed to work with
> the
> coding from the template file copying to the child file? maybe i don"t
> understnad what you mean by child file. Anyway it seems to work. Much
> appreciated!
>
Murray *ACE* Guest



Reply With Quote

