Find the answer to your Linux question:
Results 1 to 6 of 6
I have a dreamweaver template that contains an include file. The include file contains the code for a navigation bar that makes use of a dropdown box. The reason why ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User Allblack's Avatar
    Join Date
    May 2003
    Location
    Godzone
    Posts
    416

    Include files not working properly


    I have a dreamweaver template that contains an include file.
    The include file contains the code for a navigation bar that makes use of a dropdown box.

    The reason why the code is not directly in the template is because hundreds of people make use of it . The nav bar's content will change frequently and therefore needs to be in one location.

    I have just taken over the responsibility of this . It is not working and I want to sort it out. The problem is that at the moment the include file needs to be in every subfolder of EVERY website that makes use of the template.

    Once changes have been made we need to send out the include files and they need be placed in every subfolder. This will be very time consuming.
    Unless, I can fix it,I will try to write a script to do this

    When I place the files in the root of each website (or central location) and use and absolute or relative path to point to it I cannot get it to go.

    I had nothing to do with the design or setup but server includes work on the server.

    Any ideas?
    I am on a journey to mastering Linux and I got a bloody long way to go!!!

  2. #2
    Linux Engineer Giro's Avatar
    Join Date
    Jul 2003
    Location
    England
    Posts
    1,219
    Why dont you use one common file if they are all the same? I dont see the point in having say 30 files when all you need is one. Also how are you including the file i guess you mean server side includes? You should be able to include it over http. like so


  3. #3
    Linux User Allblack's Avatar
    Join Date
    May 2003
    Location
    Godzone
    Posts
    416
    Of course there is no point in duplicating it 30 times if it works with one file. This exactly what I need to achieve
    Unfortunately it does not work. I have tried specifying it with an absolute path and relative path. I have tried pointing it to the same file under a different url and I have pointed it with an absolute path to the root of the url. It does not seem to go

    cheers
    I am on a journey to mastering Linux and I got a bloody long way to go!!!

  4. #4
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    when your actually working on the file it may not appear to work, you need to be accessing the file via apache, it using your brower at http://localhost/path/file.shtml rather than file://home/username/file.shtml.

    Also, the file extension of the file which contains the include line must (by default) be shtml. If you have access to your httpd.conf you can change this.

    Ie, make it like: rather than being .shtml

    Code:
    AddType text/html .html
    AddHandler server-parsed .html
    Jason

  5. #5
    Linux User Allblack's Avatar
    Join Date
    May 2003
    Location
    Godzone
    Posts
    416
    What could cause one file to be included but not an other?
    In my page I have
    Code:
     
    This works and I can put the file that contains the include in whatever subfolder
    However, it does not work for another file unless I place that file in the same folder.
    This file as an html extension as well and the server is configured to parse these.
    The include looks exactly the same, just another file name.
    The only difference in the files is that the latter contains loads of Javascript.


    cheers
    I am on a journey to mastering Linux and I got a bloody long way to go!!!

  6. #6
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    not too sure, only thing i could guess is there is maybe a spelling mistake on the include line, or the path is not correct.

    Apache *may* log something to its error log depending on the cause of the problem, but no gaurentees.

    Jason

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •