8 Replies Latest reply on Apr 24, 2007 9:30 AM by Newsgroup_User

    Dynamic Text (How?)

    HD 01
      Dreamweaver users,
      this is probably a very naive question, but I've never been able to find a straightforward answer, so I'm trying again:

      HOW ... do I create a simple website (with the usual array of navigation buttons) which permits html pages (of text) to be loaded into 1 area of the page ... without using frames?

      I've searched endlessly, but there doesn't seem to be an easy answer to what should be the most straightforward of all web building questions; as websites by their very nature are mostly required to show reveal content stored on text pages.
        • 1. Re: Dynamic Text (How?)
          Level 7
          HD 01 wrote:
          > Dreamweaver users,
          > this is probably a very naive question, but I've never been able to find a
          > straightforward answer, so I'm trying again:
          >
          > HOW ... do I create a simple website (with the usual array of navigation
          > buttons) which permits html pages (of text) to be loaded into 1 area of the
          > page ... without using frames?

          you can either build several pages that are indentical except for the text in the area you want to
          change, and call each page via your navigation.
          Modern browsers will only redraw the part of the page that changes, so it will look like only the
          changing text loads.

          Or, you can use a dynamic template, using a server side language, such as PHP (free open-source) or
          ASP (proprietary) or any other.

          Example with PHP:

          each text you want to load should contain only the code for the text, no doctype, no head tags,
          nothing else. And should be saved as a separate file, for example as 'text1.html', 'text2.html' etc.

          In the main page, where the text should show, write:

          <?php
          include($text);
          ?>

          At the top of the main page code, above all the html code, you could have:
          <?php
          $text = $_GET['text'];
          ?>

          then in your navigation, the links to load the page would simply be:

          <a href="?text=text1.html">First text</a>

          This is the basic system for doing what you're looking for using server-side langauge.

          Or, you can also use javascript to do that, look into Dreamweaver's behavior called "set text of layer"


          >
          > I've searched endlessly, but there doesn't seem to be an easy answer to what
          > should be the most straightforward of all web building tasks, as websites by
          > their very nature are mostly required to show different text pages.
          >

          --
          seb ( ---@webtrans1.com)
          http://webtrans1.com | high-end web design

          An Ingenious WebSite Builder: http://sitelander.com
          • 2. Re: Dynamic Text (How?)
            HD 01 Level 1
            Cheers!

            'Set text of layer' seems the most accessible method.

            Is it possible to cue external html pages in this manner, though?
            • 3. Re: Dynamic Text (How?)
              bregent Most Valuable Participant
              >'Set text of layer' seems the most accessible method.

              That works fine for a small amount of text. But you wouldn't want you have your entire website stored in a single page for performance and other reasons.

              >Is it possible to cue external html pages in this manner, though?

              No, not really. You would need to use AJAX or similar methods. Why do you not simply want to link directly to other flat pages? This is the way most of the web works.
              • 4. Re: Dynamic Text (How?)
                Level 7

                "HD 01" <webforumsuser@macromedia.com> wrote in message
                news:f0kma0$r33$1@forums.macromedia.com...

                > I've searched endlessly, but there doesn't seem to be an easy answer to
                > what
                > should be the most straightforward of all web building tasks, as websites
                > by
                > their very nature are mostly required to show different text pages.

                Not sure where you got this idea - it's not true at all. Pages are designed
                to stand on their own, not to be displayed as parts of other pages.


                --
                Patty Ayers | Adobe Community Expert
                www.WebDevBiz.com
                Free Articles on the Business of Web Development
                Web Design Contract, Estimate Request Form, Estimate Worksheet
                --


                • 5. Dynamic Text (How?)
                  HD 01 Level 1
                  Erm, you might be missing the point of my question (or I haven't written my question succinctly enough):

                  Take apple.com (or any other similar site): are you saying that 'Store', 'Hardware' etc. is on 'every single page of text cued'? - or is it that the navigation console resides as a master element, loading text pages into a live area?

                  I currently use iFrames, but they aren't search engine friendly (as is commonly known).

                  So my question is how the likes of Apple make text appear once a button is pressed, without using frames.

                  It seems to me that every site has a button which loads text to a live area - surely not every site has everything stored on the page infinitum?
                  • 6. Re: Dynamic Text (How?)
                    Level 7


                    > Take apple.com

                    that's a dynamic site, with scripts on the server building each page as
                    requested.

                    but- each "page" is a full page, it's not loading new text into a part of
                    the existing page that stays in the browser window when a link is clicked.
                    The browser refreshes and a new full page is delivered.

                    parts of the page that are used on all of the pages are scripted includes,
                    so that when it's time to edit the navigation menu, only one file needs to
                    be edited; the changes will appear in all pages using that nav menu include.

                    --
                    Alan
                    Adobe Community Expert, dreamweaver

                    http://www.adobe.com/communities/experts/



                    • 7. Re: Dynamic Text (How?)
                      Level 7
                      I'm not missing the point - I think you need to understand some of the
                      basics about HTML pages before most of this will make any sense. Alan's
                      reply gets right to it.

                      --
                      Patty Ayers | Adobe Community Expert
                      www.WebDevBiz.com
                      Free Articles on the Business of Web Development
                      Web Design Contract, Estimate Request Form, Estimate Worksheet
                      --


                      "HD 01" <webforumsuser@macromedia.com> wrote in message
                      news:f0l8cm$j5r$1@forums.macromedia.com...
                      > Erm, you might be missing the point of my question (or I haven't written
                      > my
                      > question succinctly enough):
                      >
                      > Take apple.com (or any other similar site): are you saying that 'Store',
                      > 'Hardware' etc. is on 'every single page of text cued'? - or is it that
                      > the
                      > navigation console resides as a master element, loading text pages into a
                      > live
                      > area?
                      >
                      > I currently use iFrames, but they aren't search engine friendly (as is
                      > commonly known).
                      >


                      • 8. Re: Dynamic Text (How?)
                        Level 7
                        > Modern browsers will only redraw the part of the page that changes, so it
                        > will look like only the changing text loads.

                        What? That's not correct. The entire page is redrawn for each link, it
                        just happens very quickly.

                        --
                        Murray --- ICQ 71997575
                        Adobe Community Expert
                        (If you *MUST* email me, don't LAUGH when you do so!)
                        ==================
                        http://www.dreamweavermx-templates.com - Template Triage!
                        http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                        http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                        http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
                        ==================


                        "(_seb_)" <seb@webtrans1.com> wrote in message
                        news:f0krda$3lo$1@forums.macromedia.com...
                        > HD 01 wrote:
                        >> Dreamweaver users,
                        >> this is probably a very naive question, but I've never been able to find
                        >> a straightforward answer, so I'm trying again:
                        >>
                        >> HOW ... do I create a simple website (with the usual array of navigation
                        >> buttons) which permits html pages (of text) to be loaded into 1 area of
                        >> the page ... without using frames?
                        >
                        > you can either build several pages that are indentical except for the text
                        > in the area you want to change, and call each page via your navigation.
                        > Modern browsers will only redraw the part of the page that changes, so it
                        > will look like only the changing text loads.
                        >
                        > Or, you can use a dynamic template, using a server side language, such as
                        > PHP (free open-source) or ASP (proprietary) or any other.
                        >
                        > Example with PHP:
                        >
                        > each text you want to load should contain only the code for the text, no
                        > doctype, no head tags, nothing else. And should be saved as a separate
                        > file, for example as 'text1.html', 'text2.html' etc.
                        >
                        > In the main page, where the text should show, write:
                        >
                        > <?php
                        > include($text);
                        > ?>
                        >
                        > At the top of the main page code, above all the html code, you could have:
                        > <?php
                        > $text = $_GET['text'];
                        > ?>
                        >
                        > then in your navigation, the links to load the page would simply be:
                        >
                        > <a href="?text=text1.html">First text</a>
                        >
                        > This is the basic system for doing what you're looking for using
                        > server-side langauge.
                        >
                        > Or, you can also use javascript to do that, look into Dreamweaver's
                        > behavior called "set text of layer"
                        >
                        >
                        >>
                        >> I've searched endlessly, but there doesn't seem to be an easy answer to
                        >> what should be the most straightforward of all web building tasks, as
                        >> websites by their very nature are mostly required to show different text
                        >> pages.
                        >>
                        >
                        > --
                        > seb ( ---@webtrans1.com)
                        > http://webtrans1.com | high-end web design
                        >
                        > An Ingenious WebSite Builder: http://sitelander.com