Professional Web Applications Themes

PHP in nested templates - Macromedia Contribute General Discussion

I am using nested templates with PHP. When a user creates a new page in Contribute 3, it executes the PHP code in the parent template and inserts the resulting html in the new page instead of the original PHP code. The PHP code in the child template is inserted as PHP code as expected. Creating new pages in Dreamweaver works fine. Is there a way round this, or can?t I use PHP in nested templates with Contribute? Thanks, Andy...

  1. #1

    Default PHP in nested templates

    I am using nested templates with PHP.

    When a user creates a new page in Contribute 3, it executes the PHP code in
    the parent template and inserts the resulting html in the new page instead of
    the original PHP code. The PHP code in the child template is inserted as PHP
    code as expected. Creating new pages in Dreamweaver works fine.

    Is there a way round this, or can?t I use PHP in nested templates with
    Contribute?

    Thanks,

    Andy

    AndyXyz Guest

  2. #2

    Default Re: PHP in nested templates

    Judging by all the forum replys, it sounds as if ASP includes/pages and
    templates are the way to go. I had my entire site done as PHP includes/pages
    and a php template and I got an Error 14 when I brought up a template page.
    Like you said, it spits out the HTML, and doesn't load the include. Contribute
    better work on that for their next update.

    A-ron

    phillyfantastic Guest

  3. #3

    Default Re: PHP in nested templates

    I'm having the same problem. The php include for the navigation in contribute messes up all the links so they break and throw errors. If anyone know a fix then please tell us.
    Robert (IT-FX) Guest

  4. #4

    Default Re: PHP in nested templates

    Robert I never found one... but I did change my PHP includes over to ASP includes & all ASP pages. Wasn't too hard to do, but it worked alot better in contribute (i did what it was suppose to do).
    phillyfantastic Guest

  5. #5

    Default Re: PHP in nested templates

    I was really annoyed with this issue so I went searching for a solution. I
    thought someone must have doented a solution somewhere out there on the web
    and sure enough after a hour or so and some testing it has fixed the issue. I
    am using PHP but there are fixes for ASP, JSP, CFM etc

    you can find the article at
    [url]http://webdevblog.uwaterloo.ca/article/140/dreamweaver-8-changes-relative-link-m[/url]
    anagement-in-templates-fix-is-here

    Just is case the link breaks at a later date, I'll add an extract of the
    article below that will point you in the right direction. Hope this helps save
    someone else some time.


    For includes

    Without using template parameters:

    Simply change double quotes to single quotes for include file path ? only
    works for ASP and .NET templates
    For example: <!--#include file='include.inc' <del>->.

    Use template expression:
    PHP: <?php include("('include.inc')"); ?>
    CFM: <cfinclude template="('include.inc')">
    JSP: <%include file="('include.inc')" %>
    ASP & .NET: <!</del>-#include file="('include.inc')" <del>->

    (Note: include.inc is the real file path, not template parameters, so it has
    to be quoted.)

    Robert (IT-FX) Guest

Similar Threads

  1. nested templates for multi-tier navigation
    By Budonk in forum Macromedia Dynamic HTML
    Replies: 3
    Last Post: August 22nd, 12:02 PM
  2. Libraries, Templates, Nested Templates, Repeat Regions,
    By Andrew_G in forum Macromedia Dynamic HTML
    Replies: 9
    Last Post: May 9th, 01:07 AM
  3. Please Fix Repeating Regions in Nested Templates
    By d_r_king in forum Macromedia Dynamic HTML
    Replies: 7
    Last Post: September 23rd, 08:54 PM
  4. Issues with templates and nested templates
    By ariasj in forum Dreamweaver AppDev
    Replies: 11
    Last Post: May 20th, 03:06 PM
  5. Repeating regions and nested templates
    By cvk@zybx.com webforumsuser@macromedia.com in forum Macromedia Dreamweaver
    Replies: 2
    Last Post: July 18th, 03:39 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139