I;m not really sure about the exact mechanics you'd like, but you can
probably set the view so that it changes according to the date:
<?php
if (date("Y-m-d") < date("2010-12-27") ) {
//Display Christmas inforamtion
} elseif (//Whatever) {
//Display other timedependant views
}
Perhaps you can use different elements (That you place in views/
elements and name accordinginly) that you load here, and tell the
controller which one to load:
In controller
if (date("Y-m-d") < date("2010-12-27") ) {
$this->set('layout', "christmas");
} elseif ((date("Y-m-d") < date("2010-08-01") && (date("Y-m-d") >
date("2010-06-01"))) {
$this->set('layout', "summer");
}
and then in the view:
echo $this->renderElement($layout);
Just two ideas from the top of my head.
On 9 feb, 05:23, Marcelo Andrade <[email protected]> wrote:
> ---------- Forwarded message ----------
> From: r sai lingeswara reddy <[email protected]>
> Date: Mon, Feb 8, 2010 at 1:31 PM
> Subject: Hello Sir
>
> Hello Sir,
> How are you?
> I have a doubt regarding the php(I'm using cakephp framework). What I
> need to do is...I have to set the expiration date a certain page. For
> example.
> I am creating a christmas party page.
> 1) I need to first set the user login page
> 2) then redirect it to the main party page
> 3) And I need to close the page on a particular date
> for example:- the party page shud be available on from dec 1st 2010
> to dec 27th 2010
> How do i do it sir? Can u guide me..Do I have to make use
> of session--put ---get?? Do u have any examples that I can go
> through...Thank u in advance...have a nice day
>
> Looking forward to ur reply...
>
> Sincerely,
> Sai
>
> --
> MARCELO F ANDRADE
> Belem, Amazonia, Brazil
>
> "I took the red pill"
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" 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