include file in include file

Discussion in 'HTML' started by PTM, Nov 12, 2007.

  1. PTM

    PTM Guest

    is there a way to make include file contain [A] another call for an
    include file ? 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 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.
     
    PTM, Nov 12, 2007
    #1
    1. Advertising

  2. PTM

    Andy Dingley Guest

    On 12 Nov, 07:39, PTM <> wrote:
    > is there a way to make include file contain [A] another call for an
    > include file ?


    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.
     
    Andy Dingley, Nov 12, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Victor Bazarov

    #include "file" -vs- #include <file>

    Victor Bazarov, Mar 5, 2005, in forum: C++
    Replies:
    4
    Views:
    544
    Exits Funnel
    Mar 6, 2005
  2. naveeddil
    Replies:
    0
    Views:
    587
    naveeddil
    Jan 4, 2008
  3. Andreas Bogenberger
    Replies:
    3
    Views:
    947
    Andreas Bogenberger
    Feb 22, 2008
  4. Eric
    Replies:
    10
    Views:
    479
  5. Eric
    Replies:
    0
    Views:
    265
Loading...

Share This Page