Let's interpret your topictitle:
" Show a Page without a Model in cakePHP"
this is exactly what you should do :) show a page in cakephp, hence
use the display action of the pagescontroller.
the pagescontroller sits by default in cakephp and is used for static
pages. if you freshly installed cakephp you'll get a front*page* that
comes per default with cake and says something like "to customize
create your own views/pages/home.ctp", so that is exactly what you
should do.
and don't forget to make a route that maps your '/' and '/home' to the
pagescontroller display action with "home" as argument:
$Route->connect('/', array('controller' => 'pages', 'action'
=>
'display', 'home'));
$Route->connect('/home', array('controller' => 'pages', 'action'
=>
'display', 'home'));
On May 17, 7:54 am, Ming <[EMAIL PROTECTED]> wrote:
> It is exactly my question (newbie to cake, too :) )
>
> My application involves lots of communication with a remote server via
> xml, just occasional local db operations.
>
> On May 16, 8:20 pm, MarsDev <[EMAIL PROTECTED]> wrote:
>
> > Hi All,
>
> > I am a newbie to cakePHP and the model-view-controller pattern. But
> > according to the books, it seems that every page cakePHP generated has
> > to be associated with a controller, a view and a model. Since the
> > cakePHP URL pattern is such that "/controller/action/params", it's
> > natural to have each page associated with a controller, the action and
> > its view. While it works quite well for most cases, I am having a
> > difficult time trying to figure out how should I code in order to show
> > something like a homepage, which only shows a aggregated view of the
> > stuff that are generated from other controllers. That said, home page
> > doesn't have any specific model associations. I.E.
>
> >http://www.example.com/home/index
>
> > I know that index can be omitted. I have HomeController and the index
> > action defined, so is the view for index action. But then if I type
> > in that URL in my sandbox, It asks me for the home model ??!! I don't
> > really have one. All I have are all concrete models like "Customer",
> > "Orders" among others. Is there work-arounds?
>
> > Also what's the best way to pull all the contents that are generated
> > from other controller/actions and aggregate them into one page?
>
> > Anyone can help me better understand the cakePHP or MVC pattern in
> > general will be highly appreciated!
>
> > Thanks!
>
> > -Ye
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---