473,809 Members | 2,710 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Templates/inclusion in the new age

I used to work as a web designer a couple of years ago, but I haven't
been closely in touch in the past years. Has anything changed recently
for managing content that is common among many pages (menus, headers,
footers...)?

The main options I recall are:
- Frames :P
- Server-side includes
- Dreamweaver templates
- PHP includes

I used Dreamweaver templates a lot -- learned to love them -- but now
I'm working on a project with another guy who does not have Dreamweaver.
I don't want to force it on him.

Is there a standard in XHTML or newer HTML standards that allows file
inclusion (much like CSS inclusion)? Or, is there some type of
pre-processor that I can run on my files to generate the final pages
(like Dreamweaver does it internally)? Ideally I would like the content
to be viewable off-line (e.g. no server-side includes)...

Thanks in advance fellow web monkeys!

Nathan
Jul 20 '05
16 2015
Nathan Funk <no**@none.co m> wrote:
What would be wrong with an <include src="mymenu.xht ml"/> ? Something so
similar is already done for including CSS and scripts... why not also
plain content???
Indeed, why can't you use the script element type to include HTML or
plain text?

<script src="why.html" type="text/html"> </script>
<script src="why.txt" type="text/plain"> </script>

Any browser (all of them) that can render files served as text/plain
or text/html should have no trouble with this.

But in fact they will all ignore it, because they "think" they don't
have a "plain text script interpreter" (Actually they do, Opera's
plain text interpreter, for example, inserts <PRE></PRE> around a text
file before passing it on to its HTML parser to be rendered.) or "HTML
script interpreter".

Maybe there's a good explanation for this. If so, you would make me a
happier person by letting me know :)


Web browsers are simple-minded pieces of software created by
simple-minded vendors.

--
"He's got a personality. He must have one, I'm sure. He just hides it
well."
- Natalie Barr describing Peter Costello.
Jul 20 '05 #11
Wolfgang Wildeblood wrote:
Indeed, why can't you use the script element type to include HTML or
plain text?

<script src="why.html" type="text/html"> </script>
<script src="why.txt" type="text/plain"> </script>


Because that would be semantically incorrect. The <script/> element
is specifically for including scripts into an (X)HTML document; nothing
else. As several people have already mentioned that using <object> can
import or maybe <iframe> can include other XHTML documents, so it's not
only incorrect, but there is no need to use <script> to include other
documents. The only problem with <object> is that it's not supported by
some older browsers, and barely supported correctly in IE. However,
IIRC, IE does work with: <object type="text/html"
data="file.html "></object>, but not much else.

--
Lachlan Hunt
http://www.lachy.id.au/
la**********@la chy.id.au.updat e.virus.scanners

Remove .update.virus.s canners to email me,
NO SPAM and NO VIRUSES!!!
Jul 20 '05 #12
Lachlan Hunt wrote:
Wolfgang Wildeblood wrote:
Indeed, why can't you use the script element type to include HTML or
plain text?

<script src="why.html" type="text/html"> </script>
<script src="why.txt" type="text/plain"> </script>
Because that would be semantically incorrect. The <script/> element
is specifically for including scripts into an (X)HTML document; nothing
else.


Define "script"? Are you saying that if it doesn't require the browser
to use its JavaScript interpreter then it can't be a script? That's
certainly how it is in practice, but it has nothing to do with
"semantics" .

As several people have already mentioned that using <object> can
import or maybe <iframe> can include other XHTML documents, so it's not
only incorrect, but there is no need to use <script> to include other
documents.
And as was already stated earlier in this thread, those people don't
know the difference between "included" and "embedded". Read the posts
by "Spartanicu s" and Roland.

The only problem with <object> is that it's not supported by
some older browsers, and barely supported correctly in IE.
The problem with OBJECT is that it has nothing to do with inclusion,
and is completely irrelevant to the present discussion. Entities would
be the correct way to go, as Roland said, but they suffer the
"disadvanta ge" of not involving pointy brackets.

However, IIRC, IE does work with: <object type="text/html"
data="file.html "></object>, but not much else.


MSIE works with all manner of embedded objects, it just doesn't work
the same as other browsers. I won't be lured into defending MSIE here,
but neither will I ignore the opportunity to point out that the weird
syntax required by MSIE, while different to what the sane world
prefers, is valid HTML by the W3C recommendations . Those benevolent
idealists leading the web to its full potential just couldn't say no
to Microsoft.

--
"Everybody can run Qantas better than I can."
- Geoff Dixon, Qantas CEO.
Jul 20 '05 #13
Wolfgang Wildeblood wrote:
Define "script"?
See this Google search for define:Script [1], the HTML 4.01
specification [2], or consult a dictionary or any other reference
material of your choice.
Are you saying that if it doesn't require the browser to use
its JavaScript interpreter then it can't be a script? That's
certainly how it is in practice, but it has nothing to do with
"semantics" .
It doesn't have to be JavaScript, but it does have to be a script; it
could be any kind of scripting language, however JavaScript is the only
common language implemented by the popular browsers (or at least a
fairly compatible version, as is the case for IE's JScript). AFAIK, IE
is the only popular browser that supports another scripting language,
VBScript, but there could be others that I don't know about.
The problem with OBJECT is that it has nothing to do with inclusion,


Yes it does! The HTML 4.01 specification clearly calls it Generic
Inclusion [3].
[1] Searched for "define:Scr ipt"
http://www.google.com.au/search?hl=e...=define:Script
[2] http://www.w3.org/TR/html401/interac...ml#edef-SCRIPT
[3] http://www.w3.org/TR/html401/struct/...ml#edef-OBJECT
--
Lachlan Hunt
http://www.lachy.id.au/
la**********@la chy.id.au.updat e.virus.scanners

Remove .update.virus.s canners to email me,
NO SPAM and NO VIRUSES!!!
Jul 20 '05 #14
Lachlan Hunt <la**********@l achy.id.au.upda te.virus.scanne rs> wrote:
The problem with OBJECT is that it has nothing to do with inclusion,


Yes it does! The HTML 4.01 specification clearly calls it Generic
Inclusion [3].


Should be ignored, <object> embeds, using the phrase inclusion for that
process causes babylonian confusion.

--
Spartanicus
Jul 20 '05 #15
Lachlan Hunt wrote:
Wolfgang Wildeblood wrote:
Define "script"?


See this Google search for define:Script [1], the HTML 4.01
specification [2], or consult a dictionary or any other reference
material of your choice.


Oh please, stop. I'm completely at the mercy of your rapier-like wit.
Jul 20 '05 #16
Nathan Funk wrote:
Brian wrote:
Nathan Funk wrote:
Has anything changed recently for managing content that is
common among many pages (menus, headers, footers...)?
No, the options are the same as you remember.


that's just sad. It's probably one of the main features that would
finally allow clean programming...


HTML is not a programming a language.
What would be wrong with an <include src="mymenu.xht ml"/> ?
Something so similar is already done for including CSS and
scripts... why not also plain content???


HTML was not designed that way. It is a fairly simple markup language,
nothing more.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #17

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2169
by: Nomak | last post by:
Hello all, i have two template classes which needs each other. I tried to write some fwd decl / decl / impl in a good way but i can't get it to compile. Explanations: - .hh files are for declaration (template or not) - .hxx files are template impl
3
1931
by: Leslaw Bieniasz | last post by:
Cracow, 20.09.2004 Hi, I am posting this again, because my previous message dated 18.09. disappeared from the list (someone has cancelled it ? why ??). I have a problem with compiling the following construction involving cross-calls of class template methods, with additional inheritance. I want to have three class templates:
5
3728
by: Dave | last post by:
Hello all, To protect against multiple inclusions, it is standard practice to enclose the contents of a header file in a construct like this: #ifndef FOO_INCLUDED #define FOO_INCLUDED .... #endif
1
2085
by: Rebecca Hoffmann | last post by:
Hi, I have a serious problem while compiling a small project (a part of the Modular Flow Scheduling Middleware: ex1): There are 3 linker errors, all from symbols that point to templates: -- verbose build output -------------------------------------------- ex1.obj : error LNK2001: unresolved external symbol "public: virtual
4
1260
by: Igor.Smirnov | last post by:
Does somebody remember, when templates appeared really in C++ compilers and became fully operational, and also when they appeared in C++ standard? Thanks! --
7
1157
by: Bern McCarty | last post by:
We have some large mixed .dlls. The percentage of code that is managed is small relative to the percentage of native code. We generally want to favor native callers. But I am struggling with the phenomenon where the mere use inclusion of headers that contain templates in /CLR compilands seems to result in methods of template instations ending up getting compiled into IL and thus penalizing native callers. This is not at all what I want...
12
2100
by: Ben | last post by:
I'm kind of new to creating templates. I've made some small class and function templates in the past and I have used quite of bit of the STL, but I am having problems tyring to create templates. I'm trying to make class templates in seperate header files with pointers to each other, and I am getting strange errors. Is it possible to do?
2
1440
by: asdf | last post by:
There are two strategies for compiling templates: the includsion model and the seperate compilation model. Could you please tell me which models vc++ and gcc take, respectively? Thanks.
6
8623
by: Hunk | last post by:
Hi I have a question on usage of forward declarations of templates. While searching through this group , people suggested using forward declarations and typedefs for templates as // in myfile.h template<typename T,typename R> class some_class;
0
9603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10387
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9200
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7662
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.