Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

PHP code not propogating to child pages

Participant ,
May 04, 2006 May 04, 2006

Copy link to clipboard

Copied

Hi, I am struggling with getting a .dwt template to propogate php code changes to its child pages. I am aware that I must put <!-- Templateinfo codeOutsideHTMLIsLocked="true"--> in the HEAD and hav edone so but any changes just don't get copied to child pages.

Appreciate any help

Here is my page head

<?php
session_cache_limiter('none');
session_start();
ob_start();
?><?php require_once('../Connections/woodveneeruk.php'); ?>
<?php
mysql_select_db($database_woodveneeruk, $woodveneeruk);
$query_categories = "SELECT sectionID, sectionName FROM sections ORDER BY sectionName DSC";
$categories = mysql_query($query_categories, $woodveneeruk) or die(mysql_error());
$row_categories = mysql_fetch_assoc($categories);
$totalRows_categories = mysql_num_rows($categories);
?><!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>
<!-- Templateinfo codeOutsideHTMLIsLocked="true"-->
<!-- #BeginEditable "doctitle" -->
<title>Wood Veneer UK - supplier of exotic, burr and decorative veneer</title>
<!-- #EndEditable -->
<meta name="keywords" content="Vale Veneer, veneer supplier, veneer inlays, exotic veneer, burr veneer, decorative veneer, wood veneer, iron-on veneer, veneer offcuts, furniture manufacturers, restorers, marquetry, hobby, wood work, craft, maple, oak, mahogany, ash, walnut burr" />
<meta content="Veneer distributor supplier offering wood veneers, maple veneer, oak veneer, exotic veneer, burr veneer, veneers packs" name=description />

<link rel="stylesheet" type="text/css" href="../style.css"/>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a )&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a
.indexOf("#")!=0){ d.MM_p=new Image; d.MM_p[j++].src=a ;}}
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a
))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d)&&d.all) x=d.all; for (i=0;!x&&i<d.forms.length;i++) x=d.forms ;
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers
.document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
//-->
</script>
<!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
</head>
TOPICS
Server side applications

Views

530
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 04, 2006 May 04, 2006

Copy link to clipboard

Copied

What DW are you using?

--
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
==================


"bikeman01" <webforumsuser@macromedia.com> wrote in message
news:e3cgvl$ce0$1@forums.macromedia.com...
> Hi, I am struggling with getting a .dwt template to propogate php code
> changes
> to its child pages. I am aware that I must put <!-- Templateinfo
> codeOutsideHTMLIsLocked="true"--> in the HEAD and hav edone so but any
> changes
> just don't get copied to child pages.
>
> Appreciate any help
>
> Here is my page head
>
> <?php
> session_cache_limiter('none');
> session_start();
> ob_start();
> ?><?php require_once('../Connections/woodveneeruk.php'); ?>
> <?php
> mysql_select_db($database_woodveneeruk, $woodveneeruk);
> $query_categories = "SELECT sectionID, sectionName FROM sections ORDER BY
> sectionName DSC";
> $categories = mysql_query($query_categories, $woodveneeruk) or
> die(mysql_error());
> $row_categories = mysql_fetch_assoc($categories);
> $totalRows_categories = mysql_num_rows($categories);
> ?><!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>
> <!-- Templateinfo codeOutsideHTMLIsLocked="true"-->
> <!-- #BeginEditable "doctitle" -->
> <title>Wood Veneer UK - supplier of exotic, burr and decorative
> veneer</title>
> <!-- #EndEditable -->
> <meta name="keywords" content="Vale Veneer, veneer supplier, veneer
> inlays,
> exotic veneer, burr veneer, decorative veneer, wood veneer, iron-on
> veneer,
> veneer offcuts, furniture manufacturers, restorers, marquetry, hobby, wood
> work, craft, maple, oak, mahogany, ash, walnut burr" />
> <meta content="Veneer distributor supplier offering wood veneers, maple
> veneer, oak veneer, exotic veneer, burr veneer, veneers packs"
> name=description
> />
>
> <link rel="stylesheet" type="text/css" href="../style.css"/>
>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
>
> <script language="JavaScript" type="text/JavaScript">
> <!--
> function MM_swapImgRestore() { //v3.0
> var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++)
> x.src=x.oSrc;
> }
>
> function MM_preloadImages() { //v3.0
> var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
> var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0;
> i<a.length;
> i++)
> if (a.indexOf("#")!=0){ d.MM_p=new Image; d.MM_p.src=a;}}
> }
>
> function MM_swapImage() { //v3.0
> var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array;
> for(i=0;i<(a.length-2);i+=3)
> if ((x=MM_findObj(a))!=null){document.MM_sr=x; if(!x.oSrc)
> x.oSrc=x.src;
> x.src=a;}
> }
>
> function MM_findObj(n, d) { //v4.01
> var p,i,x; if(!d) d=document;
> if((p=n.indexOf("?"))>0&&parent.frames.length) {
> d=parent.frames.document; n=n.substring(0,p);}
> if(!(x=d)&&d.all) x=d.all; for (i=0;!x&&i<d.forms.length;i++) x=d.forms;
> for(i=0;!x&&d.layers&&i<d.layers.length;i++)
> x=MM_findObj(n,d.layers.document);
> if(!x && d.getElementById) x=d.getElementById(n); return x;
> }
> //-->
> </script>
> <!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
> </head>
>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 04, 2006 May 04, 2006

Copy link to clipboard

Copied

8

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 04, 2006 May 04, 2006

Copy link to clipboard

Copied

The template looks fine. When you spawn a child page from it, the recordset
markup is in the page, right? Then you make a change to the recordset code,
and that change does NOT propagate to child pages? Is this correct?

--
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
==================


"bikeman01" <webforumsuser@macromedia.com> wrote in message
news:e3csb2$qg6$1@forums.macromedia.com...
>8


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 04, 2006 May 04, 2006

Copy link to clipboard

Copied

yes, that's my problem

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 04, 2006 May 04, 2006

Copy link to clipboard

Copied

Here are six ways to make changes not propagate from Template to child -

1. Rename the Templates folder
2. Move the Templates folder to some other folder level in the site other
than root level
3. Move a template out of the Templates folder.
4. Make changes to an editable region of the template (which will not
propagate)
5. Assume that template changes can be uploaded to the server without also
uploading the changed local files
6. Corrupt the site cache so that the link between template and child page
is broken

The latter problem can be repaired by using SITE | Advanced > Recreate Site
Cache, and the five others can be fixed by just not doing them. Have you
done any of those?


--
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
==================


"bikeman01" <webforumsuser@macromedia.com> wrote in message
news:e3d1o9$4ae$1@forums.macromedia.com...
> yes, that's my problem


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 10, 2006 May 10, 2006

Copy link to clipboard

Copied

I don't think any of those are my problem. But I have notticed that when I create a page from my template the following is inserved:

<!-- InstanceBegin template="/Templates/Main.dwt.php" codeOutsideHTMLIsLocked="false" -->

So when I add <!-- Templateinfo codeOutsideHTMLIsLocked="true"--> to the head I think they must confilct.

Why is <!-- InstanceBegin template="/Templates/Main.dwt.php" codeOutsideHTMLIsLocked="false" --> being added to my child pages and how do i edit it?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 11, 2006 May 11, 2006

Copy link to clipboard

Copied

Maybe your PHP code is outside the template...

The structure should look like this:

<Your_template_begins_here>
<?php
"this is php code"
?>
<Your_template_ends_here>

The whole PHP code is nested inside the template tags.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 12, 2006 May 12, 2006

Copy link to clipboard

Copied

You lost me with that one, it is not necessary to have php code inside the template...

I'll explain again. Here is my .dwt content:

<?php
session_cache_limiter('none');
session_start();
ob_start();
?><!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>

and here is the child page it creates:

<?php
session_cache_limiter('none');
session_start();
ob_start();
?><!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"><!-- InstanceBegin template="/Templates/Main.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>


As you can see the begin template and the codeOoutside bit has been added during the creation of the child page by Dreamweaver. I want to change it to codeouside=TRUE.

How can I do this if this part of the page is not editable?
or
How can I tell DW to create child pages with codeoutside=TRUE?

I have tried recreating the template and it's still doing this?
Is this a bug?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 12, 2006 May 12, 2006

Copy link to clipboard

Copied

Oh, i see...

When you create a template, you need to specify which part of the page be made into editable region.

If you want the content area to be editable, select that area, right-click and choose template > editable region.

Once finished, save the whole page as template. When you have a new page and apply a template to that page, the new page will have the same design layout as the template, and you can only modify the area that you made editable.

I hope I'll get it right this time.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 15, 2006 May 15, 2006

Copy link to clipboard

Copied

LATEST
johnycage, look mate thanks for trying to help but you're way off the mark here - I am not having a problem with editable regions. Please let someone else answer this.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines