Ask a Question related to Macromedia Dynamic HTML, Design and Development.
-
DianeV #1
PHP Code above DW Template doctype?
I've built a website in a DW Template; the pages are .php. We added a PHP
script, a bit of code that needs to be at the top of the pages (before the
doctype, or anything else, for that matter), which works fine in the Template
-- except for the couple of pages that need slightly different script at the
top; when we update the Template it rewrites the page-top script in those two
pages.
I'd thought of adding an editable region above the <head>, but I'm not sure
how DW might treat an editable region above the <head> and it would mean
comment tags as the first item on the page rather than the PHP script.
Of course, I can manually edit the couple of pages (or detach them from the
Template), but I'd far prefer to allow DW to update the Template without
touching this code. Is there some way around this, so that the DW Template
ignores the code above, say, the doctype?
Thanks in advance.
DianeV Guest
-
capture code generated from template
is there any way to capture the output generated by a template into a variable? -
Contribute changes template code when editing
i have a javascript in my template which is in a locked area. when i edit a page in contribute, it removes the line breaks in the script and breaks... -
How to add or modify template columns via-code
Hi, I know how to add template columns via the designer or the HTML source Now, I want to add a template column (<ItemTemplate> and... -
code block in template control
I have created a templated control. I used for a while and the I decided to put some internatioanlized string instead of hardcoded string into the... -
Fitting the asp code in a page inside the asp code in a template
I'm adding code in a template which connects to the only database and also closes the connection. Every page in the site uses the template and... -
Murray *ACE* #2
Re: PHP Code above DW Template doctype?
> when we update the Template it rewrites the page-top script in those two
This is not the default behavior of templates. By default the regions above> pages.
<html> and below </html> are treated as editable regions. Changes that you
make to the template will never propagate that code, hence will never
overwrite that region. The overwriting can ONLY occur if you change from
the default treatment to an optional treatment of those regions by including
the line -
<!-- TemplateInfo codeOutsideHTMLIsLocked="true" -->
in the head region of the template page. This tells DW to consider the
region outside of <html> as if it were non-editable, and therefore changes
there WILL propagate. In addition, because this region is now non-editable,
when a child page with unique content in that region is updated by the
template, that unique content will be erased.
Did you do this?
You cannot do that.> I'd thought of adding an editable region above the <head>, but I'm not
> sure
> how DW might treat an editable region above the <head> and it would mean
> comment tags as the first item on the page rather than the PHP script.
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
[url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
[url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
[url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
[url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
==================
"DianeV" <webforumsuser@macromedia.com> wrote in message
news:e9l91u$ion$1@forums.macromedia.com...> I've built a website in a DW Template; the pages are .php. We added a PHP
> script, a bit of code that needs to be at the top of the pages (before the
> doctype, or anything else, for that matter), which works fine in the
> Template
> -- except for the couple of pages that need slightly different script at
> the
> top; when we update the Template it rewrites the page-top script in those
> two
> pages.
>
> I'd thought of adding an editable region above the <head>, but I'm not
> sure
> how DW might treat an editable region above the <head> and it would mean
> comment tags as the first item on the page rather than the PHP script.
>
> Of course, I can manually edit the couple of pages (or detach them from
> the
> Template), but I'd far prefer to allow DW to update the Template without
> touching this code. Is there some way around this, so that the DW
> Template
> ignores the code above, say, the doctype?
>
> Thanks in advance.
>
Murray *ACE* Guest
-
DianeV #3
Re: PHP Code above DW Template doctype?
Thanks, Murray. I was hoping you'd show up. :)
<!-- TemplateInfo codeOutsideHTMLIsLocked="true" -->
Yes, that's what it says. Thanks for explaining.
If I can find a (correct) way to switch it to false, I'll just have to
manually add the php coding to the top, but that would be preferable to
hand-editing the two pages every time we do a template update.
DianeV Guest
-
DianeV #4
Re: PHP Code above DW Template doctype?
Ah, I was able to do it simply by editing that comment in the Template. How easy was that?!!
You da man, Murray. :)
DianeV Guest
-
Murray *ACE* #5
Re: PHP Code above DW Template doctype?
Actually, just remove that line altogether from the template page. That
will give you the default behavior, which is FALSE.
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
[url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
[url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
[url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
[url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
==================
"DianeV" <webforumsuser@macromedia.com> wrote in message
news:e9levm$q5f$1@forums.macromedia.com...> Ah, I was able to do it simply by editing that comment in the Template.
> How easy was that?!!
>
> You da man, Murray. :)
Murray *ACE* Guest
-
-
Murray *ACE* #7
Re: PHP Code above DW Template doctype?
You're welcome....
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
[url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
[url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
[url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
[url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
==================
"DianeV" <webforumsuser@macromedia.com> wrote in message
news:e9marr$2t7$1@forums.macromedia.com...> Excellent. Thanks.
Murray *ACE* Guest



Reply With Quote

