Hai,
  I don't want to place the code in view/elements.
 Assume i have pages  for mails in view/mails.
  I don't want to keep the email.ctp in view/elements as it again
modularizes the code,
  some pages in view/mails and some code in view/elements related to
mails module.
 I want to keep all the pages/code in view/mails and render/include
the pages  like you showed me in example.
Is that possible


On Sep 3, 5:37 pm, Charlie van de Kerkhof <[EMAIL PROTECTED]>
wrote:
> Hi Ravi,
>
> in cakePHP you can make view elements which contains pieces of PHP and
> HTML code.
> In that mail template of yours you can 'include' those elements.
>
> example:
> in email.ctp (or email.thtml if you still use v1.1)
> <?=$this->renderElement('loginbox', array("loggedin" => true,
> 'username'=>'ravi'));?>
>
> and in app/views/elements/loginbox.ctp (or .thtml) you have html with
> PHp that makes a login box/form with the two variables you passed.
>
> On Sep 3, 10:36 am, Ravi <[EMAIL PROTECTED]> wrote:> Hai,
> >       I want to include one page into another. How can we do that with
> > cakephp similar to php where we can use include/require. In php i am
> > passing the variables required from main page.
>
> > For example:
> >       Assume i have to display mails.
> >       For that I have three pages:
> >       PAGE 1: ( Main page1)--- Which contains logo and includes other
> > two pages.
> >       PAGE 2:   which contains info like total no of mails ,no of
> > mails unread etc.
> >       PAGE 3: which contains latest 20 mails.
>
> > My page is like
> >       <!----PAGE1 code starts here ---------------------------->
> >            //PHP code starts here
> >            //$mailsCount = array();           : This parameter is
> > handled
> >            //$mailsList = array();
> >            include("header.php");
> >            include("page2.php");  //$mailsCount array used in this
> > page
> >            include("page3.php"); //$mailsList array uses in this page
> >            <PAGE3>
> >       <!---------/PAGE1 code ends here----------------------->
>
> > How can we do similar thing in cakephp.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to