integrating/calling multiple files into one
integrating/calling multiple files into one
am 01.11.2007 21:19:15 von daniel
Hello,
Typically, I have create simple html webpages from start to finish,
everything in one html document.
I am now creating more complexe pages, and wish to compartmentalize
certain aspects. For example, the nav bar get generated by a separate
program which generate and html file, css, js.... I then call it
within my main doc. However, by doing so I end up with duplication of
head section, body.... and I assume this is not proper. The other
alternative is to copy and paste the various element of the nav bar
(styles, scripts, html) and the paste them in their respective zones.
this however, is very conterproductive as when a change need to be
made I must manually update each webpage (long and prone to errors).
What is the proper approach to doing this type of referencing multiple
docs into one.
Thank you for your experience and guidance,
Daniel
Re: integrating/calling multiple files into one
am 01.11.2007 21:51:03 von Bone Ur
Well bust mah britches and call me cheeky, on Thu, 01 Nov 2007 20:19:15 GMT
Daniel scribed:
> Hello,
>
> Typically, I have create simple html webpages from start to finish,
> everything in one html document.
>
> I am now creating more complexe pages, and wish to compartmentalize
> certain aspects. For example, the nav bar get generated by a separate
> program which generate and html file, css, js.... I then call it
> within my main doc. However, by doing so I end up with duplication of
> head section, body.... and I assume this is not proper. The other
> alternative is to copy and paste the various element of the nav bar
> (styles, scripts, html) and the paste them in their respective zones.
> this however, is very conterproductive as when a change need to be
> made I must manually update each webpage (long and prone to errors).
>
> What is the proper approach to doing this type of referencing multiple
> docs into one.
>
> Thank you for your experience and guidance,
The best thing to do is use server-side scripting such as php. SSIs are
also an option. Scripting allows you to variablize and include sections of
text, html, etc.
--
Bone Ur
Cavemen have formidable pheromones.
Re: integrating/calling multiple files into one
am 01.11.2007 21:59:31 von daniel
On Nov 1, 4:51 pm, Bone Ur wrote:
> Well bust mah britches and call me cheeky, on Thu, 01 Nov 2007 20:19:15 GMT
> Daniel scribed:
>
>
>
>
>
> > Hello,
>
> > Typically, I have create simple html webpages from start to finish,
> > everything in one html document.
>
> > I am now creating more complexe pages, and wish to compartmentalize
> > certain aspects. For example, the nav bar get generated by a separate
> > program which generate and html file, css, js.... I then call it
> > within my main doc. However, by doing so I end up with duplication of
> > head section, body.... and I assume this is not proper. The other
> > alternative is to copy and paste the various element of the nav bar
> > (styles, scripts, html) and the paste them in their respective zones.
> > this however, is very conterproductive as when a change need to be
> > made I must manually update each webpage (long and prone to errors).
>
> > What is the proper approach to doing this type of referencing multiple
> > docs into one.
>
> > Thank you for your experience and guidance,
>
> The best thing to do is use server-side scripting such as php. SSIs are
> also an option. Scripting allows you to variablize and include sections of
> text, html, etc.
>
> --
> Bone Ur
> Cavemen have formidable pheromones.- Hide quoted text -
>
> - Show quoted text -
So, you are saying i should split the navbar.html into section
(header, html,...) and call them individually at the right place?
Re: integrating/calling multiple files into one
am 01.11.2007 22:00:39 von lws4art
Daniel wrote:
> Hello,
>
> Typically, I have create simple html webpages from start to finish,
> everything in one html document.
>
> I am now creating more complexe pages, and wish to compartmentalize
> certain aspects. For example, the nav bar get generated by a separate
> program which generate and html file, css, js.... I then call it
> within my main doc. However, by doing so I end up with duplication of
> head section, body.... and I assume this is not proper. The other
> alternative is to copy and paste the various element of the nav bar
> (styles, scripts, html) and the paste them in their respective zones.
> this however, is very conterproductive as when a change need to be
> made I must manually update each webpage (long and prone to errors).
>
> What is the proper approach to doing this type of referencing multiple
> docs into one.
>
> Thank you for your experience and guidance,
Google is your friend:
http://www.google.com/search?hl=en&q=how+to+include+one+html +document+into+another&btnG=Google+Search
how to include one html document into another - Google Search
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Re: integrating/calling multiple files into one
am 01.11.2007 22:08:07 von daniel
On Nov 1, 5:00 pm, "Jonathan N. Little" wrote:
> Daniel wrote:
> > Hello,
>
> > Typically, I have create simple html webpages from start to finish,
> > everything in one html document.
>
> > I am now creating more complexe pages, and wish to compartmentalize
> > certain aspects. For example, the nav bar get generated by a separate
> > program which generate and html file, css, js.... I then call it
> > within my main doc. However, by doing so I end up with duplication of
> > head section, body.... and I assume this is not proper. The other
> > alternative is to copy and paste the various element of the nav bar
> > (styles, scripts, html) and the paste them in their respective zones.
> > this however, is very conterproductive as when a change need to be
> > made I must manually update each webpage (long and prone to errors).
>
> > What is the proper approach to doing this type of referencing multiple
> > docs into one.
>
> > Thank you for your experience and guidance,
>
> Google is your friend:
>
> http://www.google.com/search?hl=en&q=how+to+include+one+html +document...
> how to include one html document into another - Google Search
>
> --
> Take care,
>
> Jonathan
> -------------------
> LITTLE WORKS STUDIOhttp://www.LittleWorksStudio.com- Hide quoted text -
>
> - Show quoted text -
I understand the basics of including the file. My issue is that the
file in question is a html file on it's own (styles, header info,
script and html) if I include it at the appropriate place in the main
page I double up on these sections. So I end up with a 2nd header
within the body of my main page, etc.
If it were merely html coding (tables, text....) then no problem a
simple include work great but in this case i was wondering if I was
missing an obvious tip/trick that professional use.
Thank you for your reply! I am going through google in more detail.
Re: integrating/calling multiple files into one
am 01.11.2007 22:54:09 von lws4art
Daniel wrote:
> On Nov 1, 5:00 pm, "Jonathan N. Little" wrote:
>> Daniel wrote:
>>> Hello,
>>> Typically, I have create simple html webpages from start to finish,
>>> everything in one html document.
>>> I am now creating more complexe pages, and wish to compartmentalize
>>> certain aspects. For example, the nav bar get generated by a separate
>>> program which generate and html file, css, js.... I then call it
>>> within my main doc. However, by doing so I end up with duplication of
>>> head section, body.... and I assume this is not proper. The other
>>> alternative is to copy and paste the various element of the nav bar
>>> (styles, scripts, html) and the paste them in their respective zones.
>>> this however, is very conterproductive as when a change need to be
>>> made I must manually update each webpage (long and prone to errors).
>>> What is the proper approach to doing this type of referencing multiple
>>> docs into one.
>>> Thank you for your experience and guidance,
>> Google is your friend:
>>
>> http://www.google.com/search?hl=en&q=how+to+include+one+html +document...
>> how to include one html document into another - Google Search
> I understand the basics of including the file. My issue is that the
> file in question is a html file on it's own (styles, header info,
> script and html) if I include it at the appropriate place in the main
> page I double up on these sections. So I end up with a 2nd header
> within the body of my main page, etc.
>
> If it were merely html coding (tables, text....) then no problem a
> simple include work great but in this case i was wondering if I was
> missing an obvious tip/trick that professional use.
>
> Thank you for your reply! I am going through google in more detail.
>
If you do Google and read about includes, be they SSI, PHP or other
server-side scripting, your will learn that the parts to be included,
are just that parts. Only put the markup for the part that is to be
inserted, i.e., for a navbar included there would only be a UL of links
with not HTML HEAD BODY on other elements...
"http://www.w3.org/TR/html4/strict.dtd">
Sample Page
A Sample PHP Include Page
The rest of your page...
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Re: integrating/calling multiple files into one
am 01.11.2007 22:59:30 von Els
Daniel wrote:
> On Nov 1, 5:00 pm, "Jonathan N. Little" wrote:
>> Daniel wrote:
>>> I am now creating more complexe pages, and wish to compartmentalize
>>> certain aspects. For example, the nav bar get generated by a separate
>>> program which generate and html file, css, js.... I then call it
>>> within my main doc. However, by doing so I end up with duplication of
>>> head section, body.... and I assume this is not proper. The other
>>> alternative is to copy and paste the various element of the nav bar
>>> (styles, scripts, html) and the paste them in their respective zones.
>>> this however, is very conterproductive as when a change need to be
>>> made I must manually update each webpage (long and prone to errors).
>> http://www.google.com/search?hl=en&q=how+to+include+one+html +document...
>> how to include one html document into another - Google Search
> I understand the basics of including the file. My issue is that the
> file in question is a html file on it's own (styles, header info,
> script and html) if I include it at the appropriate place in the main
> page I double up on these sections. So I end up with a 2nd header
> within the body of my main page, etc.
You're saying the 'file in question', navbar.html, is generated. Can't
you generate separate files? Or, instead of splitting it up and
pasting it their respective zones, just split it up once, into
different files. Those files you can then include through SSI or php
includes. A change then only has to be made once to this set of files
(formerly one navbar.html file).
> If it were merely html coding (tables, text....) then no problem a
> simple include work great but in this case i was wondering if I was
> missing an obvious tip/trick that professional use.
If you give more info on the generation of this navbar.html file,
maybe someone will see a better way to get the result you're after.
--
Els http://locusmeus.com/
Re: integrating/calling multiple files into one
am 02.11.2007 00:32:48 von Bone Ur
Well bust mah britches and call me cheeky, on Thu, 01 Nov 2007 20:59:31
GMT Daniel scribed:
>> > What is the proper approach to doing this type of referencing
>> > multiple docs into one.
>>
>> > Thank you for your experience and guidance,
>>
>> The best thing to do is use server-side scripting such as php. SSIs
>> are also an option. Scripting allows you to variablize and include
>> sections of text, html, etc.
>>
>> --
>> Bone Ur
>> Cavemen have formidable pheromones.- Hide quoted text -
>>
>> - Show quoted text -
>
> So, you are saying i should split the navbar.html into section
> (header, html,...) and call them individually at the right place?
Well, I haven't seen your work, but that's probably what I'd do. When I
use includes (seldom), it's usually just data - no styles. I find it
easier to locate styles all in one place and manipulate the pieces of data
and html as I wish without worrying about adjuncts.
--
Bone Ur
Cavemen have formidable pheromones.
Re: integrating/calling multiple files into one
am 02.11.2007 13:50:23 von daniel
On Nov 1, 7:32 pm, Bone Ur wrote:
> Well bust mah britches and call me cheeky, on Thu, 01 Nov 2007 20:59:31
> GMT Daniel scribed:
>
>
>
>
>
> >> > What is the proper approach to doing this type of referencing
> >> > multiple docs into one.
>
> >> > Thank you for your experience and guidance,
>
> >> The best thing to do is use server-side scripting such as php. SSIs
> >> are also an option. Scripting allows you to variablize and include
> >> sections of text, html, etc.
>
> >> --
> >> Bone Ur
> >> Cavemen have formidable pheromones.- Hide quoted text -
>
> >> - Show quoted text -
>
> > So, you are saying i should split the navbar.html into section
> > (header, html,...) and call them individually at the right place?
>
> Well, I haven't seen your work, but that's probably what I'd do. When I
> use includes (seldom), it's usually just data - no styles. I find it
> easier to locate styles all in one place and manipulate the pieces of data
> and html as I wish without worrying about adjuncts.
>
> --
> Bone Ur
> Cavemen have formidable pheromones.- Hide quoted text -
>
> - Show quoted text -
Thank you all for your time and advice!
Daniel - Learning all the time