Using Dreamweaver to edit *partial* web page (chunks of HTML code)?

Hello,
I am using a custom PHP framework to build a website.
This framework is quite simple, it relies on 2 types of files:
Templates: site-wide PHP/HTML files including all the logic, HTML header (links to CSS & JS files), Company logo HTML menus & related navigation code, searchbox, footer etc. Only 2 templates exist: one for the homepage, another one for all the other pages.
"content files": these files contain mostly static HTML code. Content files are imported by the PHP template using PHP's include() function.
As content files are inserted within a global HTML page, these only  contain chunks of HTML code: no tags such as "head" "body".
On the attached PNG, the green part is the code from the template, the red part is the code from the "content file".
A typical template file would be:
          <html>
            <head>
              (load CSS files, JS files...)
            </head>
            <body>
              (HTML headers & menus)
              <?php include($content_file); ?> <!-- Includes partial HTML file with page content -->
              (HTML footer)
            </body>
          </html>
A typical content file would be:
          <h1>TITLE</h1>
          <h2>subtitle</h2>
          <p>Lorem ipsum<img src=""  class="myimg" /></p>
          <h2>subitle</h2>
          <p>Lorem  ipsum</p>
Templates are NOT editable by users.
Content files are editable by users, using Dreamweaver.
The problem is, users cannot edit those content files since it is not a valid HTML page. The CSS required to enforce the styles are not loaded since HTML headers are not present. It looks ugly and Dreamweaver tries to insert standard HTML tags such as <html>, <body> and so on.
I see 2 hypothesis, but I cannot find an answer in the Dreamweaver documentation:
have DW edit the content files alone, in which cas we would need to tell DW that it is editing a partial web page and not a full one
have DW edit the content file while applying the PHP template, in which case we would need to tell DW that is should discard most of the code and save only the "content file"
Hypothesis 1: Standalone edit of content files. Is there a way to tell Dreamweaver
that it is editing a partial HTML file,
that it needs to load additional CSS stylesheet to display the styles
that it should not insert standard HTML body and headers tags, that we know the page is not standard compliant as-is
that creating additional style is forbidden, it is only allowed to use styles defined in the stylsheet
Hypothesis 2: Edit of content files within the template. is there a way to tell Dreamweaver
that it is should add HTML code from the template before and after the loaded "content file"
that when saving the "content file" it should discard all HTML/PHP code from the template, saving only the content itself
that creating additional style is forbidden, it is only allowed to use  styles defined in the stylsheet
I cannot believe noone has been faced with this problem before, the fact is I cannot find any answer about this issue.
Best Regards,
M

I have moved this thread to the Dreamweaver Application Development forum, which deals with PHP and similar issues.
Several things spring to mind.
Do your template files have a standard .html file name extension? If so, you could add .html to the file types that Dreamweaver does not automatically rewrite. Select Code Rewriting in the Preferences panel, and add .html to the list of files in "Never rewrite code".
If your template files use a file name extension not recognized by DW, add them to the list using the instructions in http://go.adobe.com/kb/ts_tn_16410_en-us. You might also need to add them to the list of files that DW doesn't rewrite.
To get access to styles in pages that are composed of fragments, use Design Time Style Sheets. See http://help.adobe.com/en_US/Dreamweaver/10.0_Using/WScbb6b82af5544594822510a94ae8d65-7e17a .html.

Similar Messages

  • Editing LR Web Pages

    I used photoshop to make a web site and the pages make sense in Dreamweaver.
    But the LR pages aren't anything I can make sense of. The images look like they are stacked on top of each other.
    Have others been able to successfully edit LR web pages? Suggestions?
    Thanks!
    Reid

    Yes, I edited them but not in Dreamweaver. It's not my favorite web development tool, but then again I don't HAVE a favorite because no one makes what I want, but that's another story. It shows up OK in the tool I prefer, ancient though it is.
    But I see what you mean with Dreamweaver! Even the footer is right on top of the other elements. I have an old Dreamweaver, it's MX.
    That said, I would imagine you wouldn't be fiddling with the placement of every element, would you? You would be playing with the headers and footers, I imagine. And making an overall page to link in your various LR pages?
    If you look at it in code view, it's pretty nicely laid out so you shouldn't have trouble finding your way around.
    I decided not to use LR for web galleries, rather to use a database driven program on my server, Gallery 2. But that was because I wanted more flexibility.
    Judy

  • Editing a Web page in External Application

    I am using Macromedia Contribute 3 and trying to edit the HTML code on a page by using the "Edit Page Source in External Application" option under File>Actions. It has worked in the past but now the "Edit Page Source in External Application" is grayed out. Any solutions? I know that I am connected to the website. Thanks.

    Hi There,
    Greetings from Adobe.
    To make that option is available, make sure the role to which you're assigned allows it. If you can't update this setting, ask the person who is assigned as website administrator.
    You will find that option under Edit > Administer Websites > Edit Role Settings > Editing > Allow users to edit a web page source in an external application.
    Regards,
    Ajit

  • Editing  a web page

    Is it possible to save and then edit a web page, deleting what I don't want to send to another person ?
    Thanks

    There is no editing module in Safari as such (as in Mozilla, for example), but you can copy and paste the content to your email message (but that's only good for the text). That's what I usually do.
    Otherwise, you can print into a PDF file and use this, but you'll need a PDF editor, such as Acrobat (the pro version).
    Hope this helps;

  • Can I use Adobe AIR applications in web pages?

    I want to use an air application in web page .can I do this?
    please help me!

    If you haven't used any AIR specific packages then the swf is same as the flash SWF for web and you can use it directly.
    Somebody correct me if I am wrong...

  • Using TextEdit to create a web page?

    I've been using Microsoft Notepad to create web pages.  Now I have an iMac, I've tried to use TextEdit, but when I save the the file as html you can see all my code. Do I need a Mac version of Notepad - is there one?
    chrisvips

    From my experience when I was doing online course for web design I did use TextEdit for the html coding in the Prefernces go to "Open and Save" under the HTML Saving Options, choose a document type, a setting for CSS and encoding.

  • How can a customer edit a web page that I have made?

    How can a customer edit a web page that I have made?  The customer should edit the text or pictures by himself. Is this possible? 

    First you can search in this forum "in browser editing".
    Second you may be interested in this video:
    http://tv.adobe.com/de/watch/designtools-in-der-creative-cloud/bearbeitung-im-browser-in-a dobe-muse/

  • I am the web master for myschool. We use sharpschool and when I go into edit our web pages all is see is the html code. I would like to have the sharpschool user friendly "word" edit come up. This does not happen with IE.

    html code is all I see when editing the school website. As the web master I can write code but prefer the edit friendly version as it is quicker. IE does not show the html code.

    Could you help me by specifying how you converted LDAP schema files to LDIF files? I am trying to add a custom schema file on an Open Directory Master running Leopard and have been unable to get Open Directory to pick up the schema file.

  • Using javascript in modified Aperture web page themes

    Thanks to the many well-written tutorials on the subject, I've been able to modify an existing Aperture web theme to export customized web pages that have the exact look I'm after. I've successfully copied the Stock theme, edited the detail and journal-gallery html along with the global.css files and merged with a professional template I purchased, so now my Aperture-generated galleries look just like the rest of the pages on my web site.
    Of course, there's always a problem:
    If I reference any Javascript from the Aperture template files, Aperture EXECUTES the script during the process of exporting the web pages, and includes the result of the Javascript execution in the rendered HTML. It does this IN ADDITION to correctly writing the Javascript reference to the rendered page. The end result is TWO of everything. An example will make this more clear:
    If I include the following line in journal-gallery.html:
    <script language="JavaScript" type="text/javascript" src="assets/scripts/sidebar.js"></script>
    and the file sidebar.js contains:
    document.write('Home
    document.write('<'t find a single reference to the use of scripts. CLEARLY APERTURE KNOWS ABOUT JAVASCRIPT AND EXPECTS TO FIND IT BECAUSE IT'S EXECUTING ANY SCRIPT IT COMES ACROSS!!!
    The goal of all this, of course, is what any large professionally-done web site strives for: I don't want to re-render all my static content (the photo galleries) every time I add or remove a link in the sidebar. Editing sidebar.js should be all that's required to change the links.
    Anyone?

    Sorry, I see that the Javascript snippets in my original post are being executing by the web browser when the message is read.
    The 2 lines of Javascript, cleverly (ahem) encoded, might be visualized:
    document (dot) write ( <html anchor tag>Home<close html anchor tag>);
    document (dot) write ( <html anchor tag>Site Map<close html anchor tag>);

  • Editing a web page online

    i know products like cushycms are great for editing web page content from a control panel of sorts - and then having the revised pages uploaded automatically - but is there a way that a page can be edited directly from it's own browser window?
    what i'm trying to accomplish is, i guess, is to emulate an intranet but in a super barebones way. i want to have a list of open projects and have different people go to the list and update the projects status, leave notes, etc.
    any ideas?
    thanks.

    Not sure what you're using this for, but TikiWiki is a popular CMS / on-line Groupware for articles, comments, blogs, meeting calendars, polls, photo or file sharing, FAQs, networking, chats, intranets...
    Features:
    http://doc.tikiwiki.org/tiki-index.php?page=Features
    Skins or Themes:
    http://themes.tikiwiki.org/tiki-index.php
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb

  • Dreamweaver 8 - Issues centering web page

    I recently started my own business and am on a budget so decided to design the web page myselt with Photoshop and Dreamweaver 8.  It went well except for the fact that my page won't center itself on screens, and b/c I created it on a display that is 1920x1080 I don't have good results on smaller screens.  I used layers, and can't convert to tables b/c of the overlapping layers I have.  I treid recreating the whole page again and not using overlapping layers, but once I converted to tables and viewed in browser I found that my buttons were moved all around.  I'm really having a difficult time with this and have spend the last two days trying various fixes with no luck...Any help would be apprecitated - the site is up and here is the link www.digitalrootsstudio.com
    Thanks in advance

    digitalroots wrote:
    So I would put the above text right after the body tag on top of html?  Do I need to put the above code again at the end of the html, or only on top?
    Yes.
    <div id="container">
    Then all your absolutely positioned layers go here
    </div><! close the container-->
    below is a simple example of absolute layers inside a relatively positioned container <div>. Note how the absolutely positioned layers move when you re-size the browser viewport window.
    I stress using absolutely positioned layers is NOT a good solution to be using but it may be the only solution if you know little about website construction.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    #container {
        position: relative;
        width: 800px;
        margin: 0 auto; /*this centers the page */
    #one {
        position: absolute;
        top: 100px;
        left: 0px;
        width: 150px;
        height: 150px;
        background-color:#CF3;
    #two {
        position: absolute;
        top: 100px;
        left: 150px;
        width: 150px;
        height: 150px;
        background-color:#39F;
    </style>
    </head>
    <body>
    <div id="container">
    <div id="one">Absolute layer one</div>
    <div id="two">Absolute layer two</div>
    </div><!-- close container -->
    </body>
    </html>

  • Dreamweaver causes corruption of web pages

    Using Dreamweaver 8, I have run into quite a severe problem
    with many of the pages on my website becoming corrupted.
    For reasons that are entirely unclear to me, Dreamweaver has
    inserted text like this:
    <!-- #BeginDate format:IS1 -->2007-05-18<!--
    #EndDate -->
    in seemingly random positions in many web pages.
    If it was simply an addition to a given web page, it would
    not be too bad. But in many cases it has wiped out parts of a line
    of text or even one or two lines of text. This is more difficult to
    repair.
    In many cases, it has added this text after the last
    </html> tag on the page. In these cases, it does not do any
    harm but it is still an unwelcome corruption of the page.
    Can anyone tell me what is going on? This is a very worrying
    feature of Dreamweaver. It has taken me quite a lot of time to
    repair all these errors.

    This has been reported from time to time. Personally, I would
    just remove
    that line from my pages. It really has very little value....
    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
    ==================
    "JGW1" <[email protected]> wrote in message
    news:f2kmek$lsf$[email protected]..
    > Using Dreamweaver 8, I have run into quite a severe
    problem with many of
    > the
    > pages on my website becoming corrupted.
    >
    > For reasons that are entirely unclear to me, Dreamweaver
    has inserted text
    > like this:
    >
    > <!-- #BeginDate format:IS1 -->2007-05-18<!--
    #EndDate -->
    >
    > in seemingly random positions in many web pages.
    >
    > If it was simply an addition to a given web page, it
    would not be too bad.
    > But
    > in many cases it has wiped out parts of a line of text
    or even one or two
    > lines
    > of text. This is more difficult to repair.
    >
    > In many cases, it has added this text after the last
    </html> tag on the
    > page.
    > In these cases, it does not do any harm but it is still
    an unwelcome
    > corruption
    > of the page.
    >
    > Can anyone tell me what is going on? This is a very
    worrying feature of
    > Dreamweaver. It has taken me quite a lot of time to
    repair all these
    > errors.
    >
    >
    >

  • How do i use the text highlighter on web pages

    I want to highlight some small print on a banking web page to email. The print is too small and will be missed if not highlighted. I have installed the text highlight add on in my tool bar but don't know how to use it.

    Hi Trease,
    Check to make sure that is it is not disabled in the about:addons page of your browser window.
    There are a few addons with that name, but I would also take a look at the description on its addons.mozilla.org page if you still have it.

  • Looking for an answer about editing a web page on two computers.

    I have an iMAC at home and at work. Can I edit my iweb webpage from both computers? If so, how? I can't figure out how to save my web page to my idisk or anywhere else so I can access it from another computer. I do have a .mac account. Can I save it there and access it from there to edit it? Any help would be great. Thanks.

    Try the instructions in this article.
    (23717)

  • When Editing A Web Page In Edge Animate, How Can I Embed Edge Elements Into Pre-Existing DIV's?

    I created a basic layout with some boxes in Dreamweaver. I set the Overflow property on them to "Hidden". I then opened the page in Edge Animate. However I noticed that when I import stuff, such as an image, then try to drag it into one of the existing DIV's, it won't work. It stays on top of all the other DIV's. However if I create a box or some other sort of DIV directly in Edge Animate, I can drag the Image element into that, so it's enclosed within that DIV.
    I guess the workaround appears to be to embed the image into the DIV in Dreamweaver first, then open the page in Edge. However it would be nice to not have to keep jumping back and forth like that. Is there a way to do this in Edge Animate?
    Also, I noticed when I select one of the DIVs I made in Dreamweaver, many of the Properties such as Corners, Shadow, and Filters are missing. Can these only be used on DIV's created directly in Edge Animate?

    Hi, neohtom-
    What you're seeing is the difference between what we define as a static div (one that is defined outside of Animate) and a managed div (one that is defined inside of Animate).  Due to the fact that we expect other products to change a static div, we limit the amount of changes you can make to a static div.  Because we "manage" a div that is created inside of Animate, we allow a lot more changes to be made to a div.  Hope that answers your question!  I'd suggest creating divs within Animate if you want to eventually change them to have corners, etc.
    Cheers,
    -Elaine

Maybe you are looking for

  • Windows 7 drivers requirement for HP dv4-1430us...

    hi, i need pre installed drivers and installers to my dv4-1430us, im planning to upgrade to windows 7.... This question was solved. View Solution.

  • Why won't my RAW files import into LR4?

    Hello all, Something very strange is going on with LR4.  I have been using LR since version 1 and never had this happen before.  When I have an SD card filled with jpegs and RAW files from my Fuji X100 camera and try to import all of them into LR 4,

  • I ordered an electronic copy of my transcript and can't save it. Help!

    Hello, there. I'm clueless. I'm in a rush, as my transcript was promised yesterday, but I can't figure out how to do it. Thank you!

  • How do I get rid of Yahoo seach engine as the default?

    How in the world do I get rid of the Yahoo search engine? No matter what I do, it comes up as the default. I've tried these: Using the search engine management in the search box 1) removed Yahoo. 2) moved Yahoo to the bottom. I've also changed the se

  • Resave and reedit forms on Adobe Reader

    I have created a pdf FORM in Adobe Professional for my dad to use with Adobe Reader (or at least not Professional). He can surely use the fields and input information onto the form and save it, but he cannot go back into the form and edit or resave (