Copy link to clipboard
Copied
Hello,
I am using a custom PHP framework to build a website.
This framework is quite simple, it relies on 2 types of files:
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:
Hypothesis 1: Standalone edit of content files. Is there a way to tell Dreamweaver
Hypothesis 2: Edit of content files within the template. is there a way to tell Dreamweaver
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
Copy link to clipboard
Copied
I have moved this thread to the Dreamweaver Application Development forum, which deals with PHP and similar issues.
Several things spring to mind.