Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > include file in include file

Reply
Thread Tools

include file in include file

 
 
PTM
Guest
Posts: n/a
 
      11-12-2007
is there a way to make include file contain [A] another call for an
include file [B] ? Or is there any other trick to reach the same aim.

in the page there is a call like this for [A]:
<!--#include file="datafiles.cfx"-->

My page includes a file containing a list of pictures and their
descriptive texts. Now I have written the text in the file [A] even
though I have the texts in separated files. So I have the texts in two
copies in the same directory.

I marked the place for the include file [B] with 'XXXXXXXXXXXXXXXX':
-------------
<td valign=top width=160>
<a href="P1030368.JPG">
<img src="THUMBS.cfx/t_P1030368.JPG"border=4>
</a>
<br>
<b>P1030368.JPG</b>XXXXXXXXXXXXXXXX<br>
<a
href="/~documents/pictures/cfx-editor.shtml?/~documents/pictures/2007/Pasi/DOC.cfx/P1030368.JPG.txt"
onclick="return popup(this, 'notes')">
EDIT</a>,
<a href="/cgi-bin/cfx/exif.pl?P1030368.JPG">EXIF</a><br>
</td>
--------------

ps: I know that the paths included are long, but I have not optimized
that part yet.
Unfortunately these pages are in a closed network and can not be seen.
 
Reply With Quote
 
 
 
 
Andy Dingley
Guest
Posts: n/a
 
      11-12-2007
On 12 Nov, 07:39, PTM <ptmu...@utu.fi> wrote:
> is there a way to make include file contain [A] another call for an
> include file [B] ?


Yes. Simple SSI won't, but many of the "programming language based"
include mechanisms will support this.

> Or is there any other trick to reach the same aim.


Generally think about just what it is you're trying to do logically
with your data, then do as close to that as you can, in terms of
implemented code. "Includes" are a pretty blunt tool, especially at
the level of what are fragments of output-ready HTML. If you're
working with a programming language instead though, this is very easy.
In particular, an example of repeated <img> elements where you had to
read matching pairs of data elements for the image URL and the alt
attribute would be impractical by includes, easy with language
variable.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
/* #include <someyhing.h> */ => include it or do not include it?That is the question .... Andreas Bogenberger C Programming 3 02-22-2008 10:53 AM
ASP Include file error <!-- #include file="" --> naveeddil ASP .Net 0 01-04-2008 12:58 PM
ASP Error 0126 include file not found, when using ".." in include file path Eric ASP General 10 01-11-2007 07:38 AM
ASP Error 0126 include file not found, when using ".." in include file path Eric ASP General 0 01-09-2007 06:54 PM
#include "file" -vs- #include <file> Victor Bazarov C++ 4 03-06-2005 07:09 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57