server side includes

Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default Server Side Includes

    hello

    I am trying to use my navagation menu as a server side include. I don't know that much about SSI, but it is working, the image shows up. But the nav uses the Dreamweaver popup menus and I can't get them to work it just says error on page. Has anyone done this? what do I need to do?

    thanks!


    new found webforumsuser@macromedia.com Guest

  2. Similar Questions and Discussions

    1. Big Problem with Server Side Includes (SSI)
      We're experiencing a major problem with Server Side Includes that are written in ASP.NET / C# code, i.e. <% Response.WriteFile...
    2. Server Side Includes and Contribute 4
      We would like to create a web site with one or two SSIs ... the site will be maintained by the client using Contribute 4. We are hoping to be able...
    3. Server Side Includes and Javascript
      Can one safely include javascript in a server-side include (SSI) file? It seems to work but don't know if it will create problems down the line. I...
    4. Random Server Side Includes
      Hi all, What I would like to do is randomize which file gets used with as a server side include. Here is what I have so far: <% Const...
    5. Editing Server Side Includes in Design View
      Hello all, I would like to know how I can edit server side includes (files ending with .ssi) in Dreamweaver MX? After I create a .SSI file and...
  3. #2

    Default server side includes

    I am in the process of investigating the feasibility of converting a large
    site from templates to server-side includes (currently ~300 template-using
    pages, and it is becoming cumbersome updating files, which does not always
    succeed 100%). The site is running on Windows2K.

    I am an almost complete novice in the use of includes. My first
    understanding was that things worked fine using document relative links if
    the include (inc) was in the same directory as the stm file, but I noticed a
    loss of links to images if the I tried to use an include in another
    directory. I have tried using various combinations of root-relative and
    document relative links, but no success. AND It seems IIS does not support
    virtual includes.
    Is there a way to do this in IIS so that the pages will properly maintain
    the correct links in the include?
    code on request!

    Thanks,
    Durwood


    Durwood Edwards Guest

  4. #3

    Default Re: server side includes

    Hmmm . . . after uploading it to my remote server,it seems to function
    properly, but testing it locally, it fails.

    Duirwood
    "Durwood Edwards" <durwoode@NOSPAMbellsouth.net> wrote in message
    news:c53jfg$hru$1@forums.macromedia.com...
    > I am in the process of investigating the feasibility of converting a large
    > site from templates to server-side includes (currently ~300 template-using
    > pages, and it is becoming cumbersome updating files, which does not
    always
    > succeed 100%). The site is running on Windows2K.
    >
    > I am an almost complete novice in the use of includes. My first
    > understanding was that things worked fine using document relative links if
    > the include (inc) was in the same directory as the stm file, but I noticed
    a
    > loss of links to images if the I tried to use an include in another
    > directory. I have tried using various combinations of root-relative and
    > document relative links, but no success. AND It seems IIS does not support
    > virtual includes.
    > Is there a way to do this in IIS so that the pages will properly maintain
    > the correct links in the include?
    > code on request!
    >
    > Thanks,
    > Durwood
    >
    >

    Durwood Edwards Guest

  5. #4

    Default Re: server side includes

    on seeing them in Dw- I haven't tested in version 7.0.1 to see if the
    updater fixed the SSI translator- in 7.0 previewing locally doesn't show
    the ssi. You can make them show be defining a testing server, either using
    a local server on your machine, or using your real remote host as the
    testing server. The later has a bit of delay, depending on your connection
    speed...

    repeated way down below is a suggestion to always use site root relative
    paths inside of includes. They are assembled in the real documents as-is
    verbatim, there's no link management or adjustment like what goes on with
    Dreamweaver Library items or Templates.

    below is general ranting and spouting that was already typed up long ago-

    from an older posting on topic of SSI--


    ******
    if possible- the structure below makes Contribute (and DMX) happier to work
    with..

    The Real file:
    <html>
    <doctype>
    <head>
    <title>title in real file</title>
    <! head include if wanted/needed>
    </head>
    <body>
    <! top of page navigation include if wanted>
    The actual page content
    <! footer include if wanted>
    </body>
    </html>

    This structure puts the
    <html><doctype><head><title></title></head><body></body></html>
    tags in the Real File- and Dreamweaver AND Contribute will be able to sort
    out the file's structure, and allow editing without going boing all the
    time.

    Another thing to avoid is a common problem some folks make with SSI
    includes--- the include files should NOT be complete html files with their
    own <html><head><body> because that would cause bad syntax when they are
    assembled
    into main real file. Such as below:

    <doctype>
    <head>
    <title>title in real file</title>
    </head>
    <body>
    <! start of a navigation include>
    <doctype>
    <head>
    <title></title>
    </head>
    <body>
    contents of include
    </body>
    </html>
    <! end of navigation include>
    Contents of real file's body section
    </body>
    </html>

    In the case above- contribute (and DMX) will have problems because of the
    multiple head and body tags. In effect- dreamweaver can't figure out where
    the mouse cursor is in the document structure- because it can't make sense
    of the structure...

    Another tip- use Site Root relative paths for links and images inside of
    the includes. That way the include can be used in any folder level of the
    site and the images and links will work.

    Final tip-
    Put html comments inside of the includes, at the top and bottom.
    <!-- start of top_nav.htm include -->
    blah blah blah code here
    <!-- end of top_nav.htm -->

    That will let you see what file contains what block of code when you are
    viewing the final page's source looking for problems....

    Alan Guest

  6. #5

    Default Server side includes

    I'm designing a site using DW templates that will ultimately be maintained
    using Contribute3. On a few of the pages, there is a Server Side Include
    within an editable reagion. Will the contribute user(s) be able to make
    changes to this SSI? I assume it change site wide given the nature of SSIs
    .... will they get a warning or error message? What will happen?

    --
    Alex


    Alexander Ross Guest

  7. #6

    Default Re: Server side includes

    there would be a kind of catch-22 depending on how you try to do this.

    The includes should not be complete html documents, so the assembled pages
    are correct syntax for they are inserted. However, that means that (as far
    as i know) the Contribute user won't be able to open and edit the includes
    BECAUSE they aren't complete docs- they won't have a head section or body
    tag. Contribute will pop up a warning that the page has syntax problems- see
    the site admin.

    If you make the includes complete html docs- the Contribute user could edit
    them (but would have to do extra steps to make absolute paths so the SSI
    would work in any folder level). BUT- now the regular pages using these SSI
    files will have multiple body tags- thus they won't be able to edit the
    regular pages in Contribute. Same "see site admin" error dialog...

    I don't have a good solution for a user-editable menu system. I take care of
    these sitewide and SSI things myself using Dreamweaver. It was too much to
    try and idiot-proof a way for the contribute user to touch them.

    Alan Guest

  8. #7

    Default Re: Server side includes

    Just to clarify and make sure we are on the same page:

    I have webpage.html which is based on template.dwt. Within an editable
    region of webpage.html I have <!--#include file(ssi.html)--> which is not a
    complete html doc (no body tag, etc...).

    I want the contribute user to be able to click "edit page" when she has
    navigated to [url]http://...../webpage.html[/url] and make changes (including changes
    to ssi.html.) I want these changes to stick site-wide when she clicks
    publish.

    I was reading your post and I get the impression that you are talking about
    having my contribute user navigate to [url]http://..../ssi.html[/url] and clicking edit
    then.

    Do your answers still apply?


    Alexander Ross Guest

  9. #8

    Default Re: Server side includes

    The contribute user Won't be able to edit the contents of the include
    "inline" from a page containing the include. ssi.inc when displayed in
    another page will appear as a locked area- dimmed and they won't be able to
    click the mouse into it.

    they may possibly be able to edit the include file by using File->Open->From
    Server and browsing to the include file (they need to know the file's name
    and location) If it will open in contribute- if they add or edit any links
    or images they would then have to use the Advanced link properties to change
    contribute's default method of making document relative paths to absolute
    paths, if the include is used in folders of different depths.

    [url]http://livedocs.macromedia.com/contribute/31/using_admin_en/wwhelp/wwhimpl/c[/url]
    ommon/html/wwhelp.htm?context=Using_and_Administering_Contrib ute&file=000003
    37.htm
    > Just to clarify and make sure we are on the same page:
    >
    > I have webpage.html which is based on template.dwt. Within an editable
    > region of webpage.html I have <!--#include file(ssi.html)--> which is not a
    > complete html doc (no body tag, etc...).
    >
    > I want the contribute user to be able to click "edit page" when she has
    > navigated to [url]http://...../webpage.html[/url] and make changes (including changes
    > to ssi.html.) I want these changes to stick site-wide when she clicks
    > publish.
    >
    > I was reading your post and I get the impression that you are talking about
    > having my contribute user navigate to [url]http://..../ssi.html[/url] and clicking edit
    > then.
    >
    > Do your answers still apply?
    >
    >
    Alan Guest

  10. #9

    Default Re: Server side includes

    thats what I needed to know ...

    thanks!

    "Alan" <dont_mail_me_period@macromedia.com> wrote in message
    news:BF54ECDE.24D625%dont_mail_me_period@macromedi a.com...
    > The contribute user Won't be able to edit the contents of the include
    > "inline" from a page containing the include. ssi.inc when displayed in
    > another page will appear as a locked area- dimmed and they won't be able
    > to
    > click the mouse into it.
    >
    > they may possibly be able to edit the include file by using
    > File->Open->From
    > Server and browsing to the include file (they need to know the file's name
    > and location) If it will open in contribute- if they add or edit any
    > links
    > or images they would then have to use the Advanced link properties to
    > change
    > contribute's default method of making document relative paths to absolute
    > paths, if the include is used in folders of different depths.
    >
    > [url]http://livedocs.macromedia.com/contribute/31/using_admin_en/wwhelp/wwhimpl/c[/url]
    > ommon/html/wwhelp.htm?context=Using_and_Administering_Contrib ute&file=000003
    > 37.htm
    >
    >> Just to clarify and make sure we are on the same page:
    >>
    >> I have webpage.html which is based on template.dwt. Within an editable
    >> region of webpage.html I have <!--#include file(ssi.html)--> which is not
    >> a
    >> complete html doc (no body tag, etc...).
    >>
    >> I want the contribute user to be able to click "edit page" when she has
    >> navigated to [url]http://...../webpage.html[/url] and make changes (including
    >> changes
    >> to ssi.html.) I want these changes to stick site-wide when she clicks
    >> publish.
    >>
    >> I was reading your post and I get the impression that you are talking
    >> about
    >> having my contribute user navigate to [url]http://..../ssi.html[/url] and clicking
    >> edit
    >> then.
    >>
    >> Do your answers still apply?
    >>
    >>
    >

    Alexander Ross Guest

  11. #10

    Default Re: Server side includes

    Thanks for the link to the livedoc Alan.

    I created a TinyURL for the same location (so the word wrapper doesn't break the URL):

    [url]http://tinyurl.com/ersol[/url]
    wickahead Guest

  12. #11

    Default Server Side Includes

    I am trying to set up a page for our contribute users. All of our pages have
    server side includes for ease of mantainence. Because the includes are virtual
    includes when you try to edit the page in Contribute, I get a "page not found"
    error.
    Is this by design? Is there a work around?
    One that I am considering is to create a page that has the content that I want
    edited in a separate page and utilize that page as an include to the main page.
    Works, but kludgy.

    Thanks,
    Jay

    visualj Guest

  13. #12

    Default Re: Server Side Includes

    I was having the same problem...

    Here is the fix I found (note: I am using IIS5 on Win 2K, so SSI may be
    handled differently in your environment - YMMV)

    Symptom: When publishing drafts (which creates and places in different
    directory), I get a "page cannot be displayed" - with a reference to the
    missing SSI)
    At that time, I was using this code:
    <!-- #include file="left-menu.htm" -->


    When I replaced the "file" include with the "virtual" include, it worked...
    <!-- #include virtual="./left-menu.htm" -->

    (Note the ./ for current directory - Contribute is smart enough to change to
    .../left-menu.htm (up one directory since drafts are in a new sub-dir) in a
    draft mode)

    Let me/us know if this works for you or if I misread your question.

    --Mark

    wickahead Guest

  14. #13

    Default Re: Server Side Includes

    I had to use a variant of your solution.
    The environment we are using is UNIX server with Apache for the web server.
    Sun One ASP for our scripting. Becasue we are not allowing navigation outside
    of directory for our includes, I had to set up a virtual directory called
    'includes'. So my #include was already using the virtual tag.
    <!-- #include virtual="includes/copyright.asp" -->
    And according to the documentation fo rSun One, I could not use a forward
    slash in front of the directory. Well, I tried it with the '/', and it worked
    both in the browser and Contribute. So my new include is:
    <!-- #include virtual="/includes/copyright.asp" -->

    So it is fixed.

    Thanks,
    Jay



    visualj Guest

Posting Permissions

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

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 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139