Sorry, forgot to change the email, I was sending this from.

Read below:

---------- Forwarded message ----------
Date: Jan 21, 2008 5:08 AM
Subject: Re: [PHPTAL] Using PHPTAL with index.php?page=... thing
To: Template Attribute Language for PHP <>

Hmm, kind of sounds like the system I built.  I have a site-controller.xmlfile:

        <warning-page use-page="warning-page.xhtml" execute="display-page"
record-page="true" />
        <send-to template-id="1">
                <page alias="main-page" use-page="main-page.xhtml"
execute="main-page" record-page="true" />
                <page alias="join-page" use-layout=" join-page.xhtml"
execute="join-page" record-page="true">

My system, I can have multiple templates, identified by the template-id,
use-page, and use-layout, this just tell me what page view to use, and the
execute attribute tells me what php file to execute, display-page is a
generic display script.  The record-page attribute, defines if I should
record traffic information for that page or not.

My directory structure looks like this:

/www/sites/                        -- usually the
controller resides here index.php
/www/sites/        -- this houses your php
code display-page, join-page etc.
/www/sites/               -- this houses your
/www/sites/            -- this houses the sites
BL objects, etc.
/www/sites/            -- This houses your
layouts, mostly header fooder stuff.
/www/sites/     -- These are certain XHTML
& javascript items you keep using throughout the site
/www/sites/                               -- This is just
the place I keep the code that phptal generates.
/www/sites/                             -- interesting
enough, there are libraries that are used for all the sites in
/www/libraries, however, you can override these libraries in this library,
this is done this way, so any changes I make for this site, won't break the
other sites I have that are up and running.
/www/sites/                    -- Well in my
system, I use propel, so I have the site-controller, and the datasource
information here

I have two kinds of controllers, a navigation controller, and a page
controller.  The navigation controller, handles authentication, and sending
people from one page to the next, also it has inside of it an access
handler, so if a page, has resources, it checks to see if you are allowed to
use those resources, and grants you access or denies you. Needless to say,
the page controller, can't work without going through the navigation

I hope that gives you some ideas.

Best regards,

On Jan 21, 2008 4:12 AM, Anton Andrievskij <[EMAIL PROTECTED]> wrote:

> Hi, PHPTAL users.
> (Sorry for my bad English as I'm from Ukraine)
> I write this letter to ask about what the best idea about how to use the
> PHPTAL engine with
> the standard PHP site engine technology like this:
> and so on...
> I'm going to build index.html template and run it from index.php page, but
> then
> I have different code to be executed on different pages like login.php ,
> faq.php, subscribe.php and so on.
> So I have to have index.html, login.html, faq.html and 
> subscrib.htmltemplates, but also
> I want to have index.php, faq.php, subscrib.php pages with some code to be
> executed.
> How can I join such things together?
> I'm really waiting for any answer or advice and any comments may help.
> Thanks in advance,
> Anton Andriyevskyy
> _______________________________________________
> PHPTAL mailing list
PHPTAL mailing list

Reply via email to