Re: define layout for error404.thtml

2007-12-17 Thread BoSc

It's that simple huh?

Why is this sort of stuff missing in the manual :'(

I hate bothering the google group for this kind of stuff.

On 11 dec, 17:41, djiize <[EMAIL PROTECTED]> wrote:
> did you try:
> layout = 'error'; ?>
> in your error404.thtml ?
>
> On 11 déc, 15:37, grigri <[EMAIL PROTECTED]> wrote:
>
> > how about
>
> > class AppController extends Controller {
> >   function beforeRender() {
> > if ($this->viewPath == 'errors') {
> >   $this->layout = 'error';
> > }
> >   }
>
> > }
>
> > On Dec 11, 2:25 pm, BoSc <[EMAIL PROTECTED]> wrote:
>
> > > I found that changing the layout in error.php (errorHandler class)
> > > does seem to work. This doens't seem like good-practice though...
>
> > > Any simpler solutions?
>
> > > On 11 dec, 11:40, BoSc <[EMAIL PROTECTED]> wrote:
>
> > > > When calling a 404 error with:
>
> > > > $this->cakeError('error404',array(array('url'=>'/')));
>
> > > > How do I set the layout for the error404.thtml. It tends to use the
> > > > default.thtml layout, but I would like to change this!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: define layout for error404.thtml

2007-12-11 Thread BoSc

I found that changing the layout in error.php (errorHandler class)
does seem to work. This doens't seem like good-practice though...

Any simpler solutions?

On 11 dec, 11:40, BoSc <[EMAIL PROTECTED]> wrote:
> When calling a 404 error with:
>
> $this->cakeError('error404',array(array('url'=>'/')));
>
> How do I set the layout for the error404.thtml. It tends to use the
> default.thtml layout, but I would like to change this!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: calling an Error 404 page from within the Controller

2007-12-11 Thread BoSc

But how do I define the layout that CakePHP should use for the
template error404.thtml


On 11 dec, 12:37, powtac <[EMAIL PROTECTED]> wrote:
> If You create a custom 404 layout, take care that an 404 code by HTTP
> is provided.
> This can be done by "header("http/1.0 404 not found");"
>
> To prevent errors you can use something like this:
>
> if(!headers_sent) {
> header("http/1.0 404 not found");
>
> }
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



define layout for error404.thtml

2007-12-11 Thread BoSc

When calling a 404 error with:

$this->cakeError('error404',array(array('url'=>'/')));

How do I set the layout for the error404.thtml. It tends to use the
default.thtml layout, but I would like to change this!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: calling an Error 404 page from within the Controller

2007-12-11 Thread BoSc

Thanks snowdog... which class offers cakeError as a method? I couldn't
find this in the API.

Another question... is it possible to set a custom layout for the
error404.thtml file?

On 11 dec, 10:58, snowdog <[EMAIL PROTECTED]> wrote:
> I use something like this (cake 1.2 prebeta):
>
> $this->cakeError('error404',array(array('url'=>'/')));
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



calling an Error 404 page from within the Controller

2007-12-11 Thread BoSc

Hi,

I was wondering, what is the correct way to call a 404 Error from
wihtin a controller?

The situation is this: I use pretty urls (for SEO) to let the user
navigate through my site. When the controller is called to show an
appartment, 4 parameters are passed. The first thing I do is check
that the parameters have been passed and that a certain one is numeric
(the id).

Currently I'm using this:

if(!is_numeric($id)) {
   $this->redirect('/');
   exit();
}

but I'm looking for a (clean) way to redirect to the error page.

Any help is appreciated!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Customizing relations

2007-11-21 Thread BoSc

It is a but of a hassle with the expects behaviour (a bit hard to
understand the logic at some times), but I've managed fixing my
problem (reduced the result set to a marginal factor of the original).

On 20 nov, 17:46, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> What you need is unbindModel (see models section in the manual), or
> the expects behaviour (see the bakery)
>
> Simon
>
> BoSc wrote:
> > Hi,
>
> > Just a simple problem, I have one central table (model) that has a lot
> > of relationships with other tables. The problem is, for one view I
> > need to get 3 levels of hierarchy (recursive) to be able to get to
> > specific data, but only for one specific direction. Since the table is
> > connected to 5 other tables, Cake tries to fetch 3 levels of hierarchy
> > in all the directions causing major overhead. I know that I can cut
> > loose some associations, but this is not the way since I do need the
> > other data be it in not so many levels of hierarchy.
>
> > Now I came up with a possible solution but I thought there could be
> > some more acceptable way in achieving this:
>
> > - just findAll() using 1/2 levels of hierarchy and query the remaning
> > information.
> > - Also I was wondering if there is some way to include the fields that
> > need to be fetched for certain relationships, when a book is connected
> > to an author, when querying all the books I might only be interested
> > in the author's name and not in the address (for instance)
>
> > Any help on this in really appreciated.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Customizing relations

2007-11-21 Thread BoSc

unbindModel lets me terminate a "relationship" between tables, this
does not let me choose the level of recursion on a model to model
basis. I will have a look at the expects behaviour.

On 20 nov, 17:46, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> What you need is unbindModel (see models section in the manual), or
> the expects behaviour (see the bakery)
>
> Simon
>
> BoSc wrote:
> > Hi,
>
> > Just a simple problem, I have one central table (model) that has a lot
> > of relationships with other tables. The problem is, for one view I
> > need to get 3 levels of hierarchy (recursive) to be able to get to
> > specific data, but only for one specific direction. Since the table is
> > connected to 5 other tables, Cake tries to fetch 3 levels of hierarchy
> > in all the directions causing major overhead. I know that I can cut
> > loose some associations, but this is not the way since I do need the
> > other data be it in not so many levels of hierarchy.
>
> > Now I came up with a possible solution but I thought there could be
> > some more acceptable way in achieving this:
>
> > - just findAll() using 1/2 levels of hierarchy and query the remaning
> > information.
> > - Also I was wondering if there is some way to include the fields that
> > need to be fetched for certain relationships, when a book is connected
> > to an author, when querying all the books I might only be interested
> > in the author's name and not in the address (for instance)
>
> > Any help on this in really appreciated.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Customizing relations

2007-11-20 Thread BoSc

Hi,

Just a simple problem, I have one central table (model) that has a lot
of relationships with other tables. The problem is, for one view I
need to get 3 levels of hierarchy (recursive) to be able to get to
specific data, but only for one specific direction. Since the table is
connected to 5 other tables, Cake tries to fetch 3 levels of hierarchy
in all the directions causing major overhead. I know that I can cut
loose some associations, but this is not the way since I do need the
other data be it in not so many levels of hierarchy.

Now I came up with a possible solution but I thought there could be
some more acceptable way in achieving this:

- just findAll() using 1/2 levels of hierarchy and query the remaning
information.
- Also I was wondering if there is some way to include the fields that
need to be fetched for certain relationships, when a book is connected
to an author, when querying all the books I might only be interested
in the author's name and not in the address (for instance)

Any help on this in really appreciated.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Combining Conditions in query's with findAll()

2007-10-19 Thread BoSc

You're right, in Cake lingo this is called HABTM, in normal database
ERD's they both have a Has Many relationship with eachother
ofcourse I have modeled this with HABTM, but thanks for your
correction!

Your solution to the order problem is 'spot on', actually what I was
looking for! I didn't knew that this was possible from within the
model.

GriGri, thanks for elaborating on the FindByFieldname() function, I
was using findBySlug() for ages, and was already wondering by this
wasn't in the API... LOL just some more Cake magic indeed!

On Oct 18, 11:30 am, "Amit Badkas" <[EMAIL PROTECTED]> wrote:
> On 10/18/07, BoSc <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi,
>
> > I've got 3 tables with a 1:n relationship:
>
> > - author (has many books)
> > ^
> > |
> > |
> > V
> > - books (belongs to categories) (has many authors)
>
> - I think you made a mistake here, actual relationships may be author HABTM
> books and books HABTM authors
>
> |
>
>
>
> > |
> > V
>
> > - categories (has many books)
>
> > What I would like to do on one page, is show a categorized view of all
> > books by a specific author. The problem lies in the fact that each
> > category and each book also has some kind of sorting involved, which
> > states at what place in a category a book should be shown...
>
> > >From which Point of View should I query this, and am I able to
> > implement this in 1 query?
>
> > What I would like to end up with is the following array
>
> > array
> >category 2
> >   book 1
> >  name
> >  blabla
> >   book 3
> >  name
> >  blabla
> >   book 2
> >  name
> >  blabla
> >category 1
> >   book 4
> >  name
> >  blabla
> >   book 6
> >  name
> >  blabla
> >   book 5
> >  name
> >  blabla
>
> > The problem is, when I use findAll on Category, I'm not able to choose
> > how Cake should order the Books. Any workarounds?
>
> - Use Category->findAll(null, null, 'Category.name ASC'); and in category
> model, define hasMany relation with book like, $hasMany = array('Book' =>
> array('order' => 'Book.name ASC'));
>
> --
> Regards,
> Amit
>
> http://amitrb.wordpress.com/http://cheesecake-photoblog.org/http://www.sanisoft.com/blog/author/amitbadkas


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Combining Conditions in query's with findAll()

2007-10-18 Thread BoSc

Btw is the findAllByAuthorId intented to be pseudo-code, or is
this really possible in CakePHP?

On Oct 18, 11:55 am, grigri <[EMAIL PROTECTED]> wrote:
> I'm not 100% sure of the "official" way of doing this, but I'd do it
> by putting a specialized search function in the model. Which model is
> up to you - a bit of a grey area. I've written a quick (untested!)
> example, in which I've put it in the Author class. Depending on other
> stuff, it might make more sense for you to have a
> "findAllCategorizedByAuthor" function in the Book model, or something.
> Anyway:
>
> class Author extends AppModel {
>   var $name = "Author";
>
>   var $hasMany = array(
> 'Book'
>   );
>
>   function findCategorizedBooks($author_id) {
> // First get all the books
> // Order them by whatever you like, add extra conditions, ...
> // Set recursive to -1 - we'll get the categories later
> $books = $this->Book->findAllByAuthorId($author_id);
>
> // Build a lookup table of category ids to book indices
> $catLUT = array();
> foreach ($books as $bookIdx => $book) {
>   $catId = $book['Book']['category_id'];
>   if (!isset($catLUT[$catId])) {
> $catLUT[$catId] = array();
>   }
>
>   array_push($catLUT[$catId], $bookIdx);
> }
> // Grab the IDs for the findAll
> $catIds = array_keys($catLUT);
>
> // Find all the relevant categories
> // Again, set recursive to -1 because we've already for the books
> and the author
> // Order by whatever you like, add extra conditions, bla bla woof
> woof
> $cats = $this->Book->Category->findAllById($catIds);
>
> // Now loop through the category list and append the books
> foreach ($cats as $catIdx => $cat) {
>   $cats[$catIdx]['Book'] = array();
>   foreach ($catLUT[$cat['Category']['id']] as $bookIdx) {
> array_push($cats[$catIdx]['Book'], $books[$bookIdx]['Book']);
>   }
> }
>
> // We're done
> return $cats;
>   }
>
> }
>
> Like I said, not tested, but I have written similar code before on a
> cake project of mine - the concept is sound.
> (Formatted a bit better here:http://openpaste.org/en/3506/)
>
> On Oct 18, 10:06 am, BoSc <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I've got 3 tables with a 1:n relationship:
>
> > - author (has many books)
> > ^
> > |
> > |
> > V
> > - books (belongs to categories) (has many authors)
>
> >  |
> >  |
> > V
>
> > - categories (has many books)
>
> > What I would like to do on one page, is show a categorized view of all
> > books by a specific author. The problem lies in the fact that each
> > category and each book also has some kind of sorting involved, which
> > states at what place in a category a book should be shown...
>
> > >From which Point of View should I query this, and am I able to
>
> > implement this in 1 query?
>
> > What I would like to end up with is the following array
>
> > array
> >category 2
> >   book 1
> >  name
> >  blabla
> >   book 3
> >  name
> >  blabla
> >   book 2
> >  name
> >  blabla
> >category 1
> >   book 4
> >  name
> >  blabla
> >   book 6
> >  name
> >  blabla
> >   book 5
> >  name
> >  blabla
>
> > The problem is, when I use findAll on Category, I'm not able to choose
> > how Cake should order the Books. Any workarounds?
>
> > Thanks


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Combining Conditions in query's with findAll()

2007-10-18 Thread BoSc

Hi Grigri,

Thanks for all your trouble, it's more clear to me now!

I'll go and try to implement this in my app.

(it's clear to me now that this is not something that is done in 1
Cakephp function/method)

On Oct 18, 11:55 am, grigri <[EMAIL PROTECTED]> wrote:
> I'm not 100% sure of the "official" way of doing this, but I'd do it
> by putting a specialized search function in the model. Which model is
> up to you - a bit of a grey area. I've written a quick (untested!)
> example, in which I've put it in the Author class. Depending on other
> stuff, it might make more sense for you to have a
> "findAllCategorizedByAuthor" function in the Book model, or something.
> Anyway:
>
> class Author extends AppModel {
>   var $name = "Author";
>
>   var $hasMany = array(
> 'Book'
>   );
>
>   function findCategorizedBooks($author_id) {
> // First get all the books
> // Order them by whatever you like, add extra conditions, ...
> // Set recursive to -1 - we'll get the categories later
> $books = $this->Book->findAllByAuthorId($author_id);
>
> // Build a lookup table of category ids to book indices
> $catLUT = array();
> foreach ($books as $bookIdx => $book) {
>   $catId = $book['Book']['category_id'];
>   if (!isset($catLUT[$catId])) {
> $catLUT[$catId] = array();
>   }
>
>   array_push($catLUT[$catId], $bookIdx);
> }
> // Grab the IDs for the findAll
> $catIds = array_keys($catLUT);
>
> // Find all the relevant categories
> // Again, set recursive to -1 because we've already for the books
> and the author
> // Order by whatever you like, add extra conditions, bla bla woof
> woof
> $cats = $this->Book->Category->findAllById($catIds);
>
> // Now loop through the category list and append the books
> foreach ($cats as $catIdx => $cat) {
>   $cats[$catIdx]['Book'] = array();
>   foreach ($catLUT[$cat['Category']['id']] as $bookIdx) {
> array_push($cats[$catIdx]['Book'], $books[$bookIdx]['Book']);
>   }
> }
>
> // We're done
> return $cats;
>   }
>
> }
>
> Like I said, not tested, but I have written similar code before on a
> cake project of mine - the concept is sound.
> (Formatted a bit better here:http://openpaste.org/en/3506/)
>
> On Oct 18, 10:06 am, BoSc <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I've got 3 tables with a 1:n relationship:
>
> > - author (has many books)
> > ^
> > |
> > |
> > V
> > - books (belongs to categories) (has many authors)
>
> >  |
> >  |
> > V
>
> > - categories (has many books)
>
> > What I would like to do on one page, is show a categorized view of all
> > books by a specific author. The problem lies in the fact that each
> > category and each book also has some kind of sorting involved, which
> > states at what place in a category a book should be shown...
>
> > >From which Point of View should I query this, and am I able to
>
> > implement this in 1 query?
>
> > What I would like to end up with is the following array
>
> > array
> >category 2
> >   book 1
> >  name
> >  blabla
> >   book 3
> >  name
> >  blabla
> >   book 2
> >  name
> >  blabla
> >category 1
> >   book 4
> >  name
> >  blabla
> >   book 6
> >  name
> >  blabla
> >   book 5
> >  name
> >  blabla
>
> > The problem is, when I use findAll on Category, I'm not able to choose
> > how Cake should order the Books. Any workarounds?
>
> > Thanks


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Combining Conditions in query's with findAll()

2007-10-18 Thread BoSc

Hi,


I've got 3 tables with a 1:n relationship:

- author (has many books)
^
|
|
V
- books (belongs to categories) (has many authors)

 |
 |
V

- categories (has many books)


What I would like to do on one page, is show a categorized view of all
books by a specific author. The problem lies in the fact that each
category and each book also has some kind of sorting involved, which
states at what place in a category a book should be shown...

>From which Point of View should I query this, and am I able to
implement this in 1 query?

What I would like to end up with is the following array

array
   category 2
  book 1
 name
 blabla
  book 3
 name
 blabla
  book 2
 name
 blabla
   category 1
  book 4
 name
 blabla
  book 6
 name
 blabla
  book 5
 name
 blabla

The problem is, when I use findAll on Category, I'm not able to choose
how Cake should order the Books. Any workarounds?

Thanks


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: No matter what I do. Same issue. I've tried numerous tutorials. Installed several times. Help anyone?

2007-10-16 Thread BoSc

Are you sure there is no typo? That the content is exactly the same as
in the error notification of CakePHP?


On Oct 16, 6:51 pm, webperson <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I continue to get this response with every tutorial I try.
> NotesController is from the last tutorial I tried. I've varified all
> files are in the correct dirs. I have no typos. And I just don't know
> what to do - I've practically been up all night trying to resolve
> this.
>
> Can anyone give me some tips here? I've tried about everything I can
> fine on Google and this group.
>
> MESSAGE ::
>
> CakePHP Rapid Development
> Missing controller
>
> You are seeing this error because controller NotesController could not
> be found.
>
> Notice: If you want to customize this error message, create app/views/
> errors/missing_controller.thtml.
>
> Fatal: Create the class below in file : app/controllers/
> notes_controller.php
>
>  class NotesController extends AppController {
>var $name = 'Notes';}
>
> ?>


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



How to use a shared webroot

2007-10-16 Thread BoSc

Hi,

I now have two CakePHP installs.

1/ A backend CMS for managing content hosted on a cms.domain.com
subdomain. The filepath to the subdomain fields is:
some_stuff_in_front/domain.com/subdomains/subdomain_name/httpdocs/

2/ A frontend installation for presenting the data. The filepath to
the main hosting is:
some_stuff_in_front/domain.com/httpdocs/

The problem is that I had uploaded all the image to the webroot (/img)
of my 1/ system, being unable to access this with relative linking
from 2/. So I thought, wouldnt it be great if my file uploadscripts of
1/ would drop the images and stuff directly in the webroot of 2/
but this gives me a basedir restriction error.

Thing is, Im unable to change any httpd.conf and stuff like that, so I
tried setting up my cake configuration as is shown in the manual under
advanced installation (seperating cake core from app and webroot
folders).

But this does not seem to work, since I keep receiving the error:


Fatal error: require() [function.require]: Failed opening required
'cake/bootstrap.php' (include_path=':/var/www/vhosts/domain.com/cgi-
bin/app/:.:/usr/share/pear:/usr/share/php') in /var/www/vhosts/
domain.com/subdomains/cms/httpdocs/app/webroot/index.php on line 78

(i've put the files in cgi_bin, because that was the only alternative
writable directory on this toplevel, besides httpdocs)

Any thoughts?

Thanks


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Using $ajax->submit from within a form

2007-08-24 Thread BoSc

Hi,

I have one big form to create a database record. But this form
contains a list that could need updating, this means that the user can
also choose to add a new field to the list by using an input field.
This input field needs ti be send to my controller using $ajax-
>submit. Problems are:

1/ I cannot create a nested 
2/ It does not work to just add the input field ($html->input) and the
ajax submitter ($ajax->submit), since this does not seem to send any
POST data.

When I create a serperate form outside the form, it does work! How
should I go about this, basically the form in a form method seems
logical, but W3C does not allow nested forms.

thanks


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Using $ajax->submit from within a form

2007-08-24 Thread BoSc

Hi,

I have one big form to create a database record. But this form
contains a list that could need updating, this means that the user can
also choose to add a new field to the list by using an input field.
This input field needs ti be send to my controller using $ajax-
>submit. Problems are:

1/ I cannot create a nested 
2/ It does not work to just add the input field ($html->input) and the
ajax submitter ($ajax->submit), since this does not seem to send any
POST data.

When I create a serperate form outside the form, it does work! How
should I go about this, basically the form in a form method seems
logical, but W3C does not allow nested forms.

thanks


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: $this->data what are the possibilities

2007-07-11 Thread BoSc

No... i cannot use hasAndBelongsToMany, since I store additional
information in the join table.
I've solved this now using more traditional methods, unfortunataly I
couldnt find a more cake-compliant solution.

On Jul 10, 11:49 am, AD7six <[EMAIL PROTECTED]> wrote:
> On Jul 10, 10:57 am, BoSc <[EMAIL PROTECTED]> wrote:
> 
>
> > Basically, the question comes down to... how can I 'crawl' through the
> > $this->data array... and make Cake clear that this contains more than
> > 1 record.
>
> Assuming you have Movie hasAndBelongsToMany Category, if you follow
> conventions cake does it for you. you just need a multi select named
> Movie.Movie in the view for your Category assigning (or whatever) view
> and when you save, the links will get created. Try with scaffolding or
> bake or refer to the manual if this pointer isn't sufficient.
>
> hth,
>
> AD


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



$this->data what are the possibilities

2007-07-10 Thread BoSc

I understand how you can populate fields using $this->data, a great
way to make the use of forms very easy. Editing one item of a database
is a piece of 'cake' this way!

What I'm trying to do now is a bit more difficult and seems to get me
stuck on using the html helper:

I've got a category, I wish to assign multiple movies at once to
this... therefor I query all currently un-assigned movies, show them
in a table, complete with checkboxes and a submit button,

I bind the findAll query to the $this->data and try to populate the
form... but how can I use $this->data which contains multiple records,
ofcourse using $html->input('Movie/name'); does not give the required
effect.

Basically, the question comes down to... how can I 'crawl' through the
$this->data array... and make Cake clear that this contains more than
1 record.

thanks


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Using standard methods to do more difficult queries

2007-07-02 Thread BoSc

So, I have been looking for info myself, and I believe this is what is
called HABTM filtering. Any tutorials on how to use bindmodel?

Because this isn't very clear to me :(


On Jul 2, 4:11 pm, BoSc <[EMAIL PROTECTED]> wrote:
> Basically what I would like to do, when calling the findAll method for
> the model Authors is giving where arguments that refer to another
> model then Authors.
>
> Suppose I have three tables
>
> *Authors
>
> have many (1:N)
>
> *Books
>
> have many (N:M)
>
> *categories
>
> If I would like to few all Books by a certain Author in a certain
> Category, how should I do this??
>
> I would expect something similar to: $this->Author-
>
> >findAll('Books_categories.category_id = id_of_category_i_want');
>
> But this doens't seem to work, I can only give wherestatements in the
> context of the table Authors.
>
> Any other approaches?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Using standard methods to do more difficult queries

2007-07-02 Thread BoSc

Basically what I would like to do, when calling the findAll method for
the model Authors is giving where arguments that refer to another
model then Authors.

Suppose I have three tables

*Authors

have many (1:N)

*Books

have many (N:M)

*categories

If I would like to few all Books by a certain Author in a certain
Category, how should I do this??

I would expect something similar to: $this->Author-
>findAll('Books_categories.category_id = id_of_category_i_want');

But this doens't seem to work, I can only give wherestatements in the
context of the table Authors.

Any other approaches?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Session changes

2007-06-24 Thread BoSc

Ah... that clarifies things, thx Grant Cox.

Changing the favicon.ico  solved the problem!

On Jun 24, 10:03 am, Grant Cox <[EMAIL PROTECTED]> wrote:
> No, it's not a bug, it's just something to keep in mind with any web
> application that uses pretty urls made to look like a folder structure
> (iehttp://localhost/controller/action/params).  The whole point is
> to make the user, your browser, and Google think that these are an
> actual folder structure (as people are used to the idea of
> categorising with folders, not so much with underscores or hyphens).
> So when you have a relative link, of course your browser assumes that
> it is relative to this pseudo folder, not realising (or caring) that
> by requestinghttp://localhost/controller/action/params/yourimage.jpg
> it is going to execute your controller action again.
>
> It's just one of those things you have to be careful of :)


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Session changes

2007-06-24 Thread BoSc

Ok, thx all, I understand now that other things are also relevant to
check when dealing with sessions. Later this day I'll try to check all
my images. I just tried a small test with 2 new actions that only
respectively set a session_VAR + redirect, and die/print_r the
Session. This seems to work, so the problem has to be somewhere else.
I do think that this is kind of a strange behaviour, certainly not
intuitive. No View related stuff should screw up my Controller's
behaviour, agree? That's part of the whole point using a MVC for
starters... Hey, but I still love Cake, only wondering wether this
could be considered a bug?

On Jun 24, 3:20 am, Grant Cox <[EMAIL PROTECTED]> wrote:
> If you refer to a file that does not exist in your webroot, then cake
> assumes it is a controller action and runs it through the dispatcher.
> So requesting /img/image_that_exists.jpg will return "/app/webroot/img/
> image_that_exists.jpg", whereas requesting /img/nonexistant_image.jpg
> will attempt to run the ImgController::nonexistant_image action (and
> will give a "Missing controller" error if your DEBUG > 1, 404
> otherwise).
>
> In both of your cases, the problem will be a relative image path being
> used.  So if you are in the /users/index action and have an image link
> to "img/something.jpg", the browser will see this as /users/index/img/
> something.jpg - and this will run through your /users/index action
> again.
>
> The solution - don't use relative images, and try to always use the
> Html Helper.  With the favicon - check in your layout as sometimes
> there is a favicon link in the  tags, and for some reason this
> will currently have a relative path (it shouldn't).
>
> And finally, BoSc, I didn't reply to your original query because it
> was too verbose, and in the 30 seconds I gave it I couldn't understand
> your problem.  Your reply to John was much more succinct :P


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Session changes

2007-06-23 Thread BoSc

why is that relevant? I do nothing with Sessions elsewhere, besides
setting en trying to read them in my actions... the rest is just plain
basics in the views... If it would really add something to this issue,
I would ofcourse be more then glad to post them here.

On Jun 23, 4:20 pm, majna <[EMAIL PROTECTED]> wrote:
> Details like layout code, view code..
>
> On Jun 23, 4:16 pm, BoSc <[EMAIL PROTECTED]> wrote:
>
> > I'm sorry...
>
> > But what more detail is there to give? I set a session variable, test
> > if it is set by echo'ing it in the same controller, which works like a
> > charm. But when I try to echo it from an other controller, it has been
> > changed to something different. The funny thing is that it is set to
> > the name of the favicon, favicon.ico. Because I was using a sort of
> > generic name: last_visited, i tried changing it to somthing less
> > obvious sadkj3423 or something, and that still results in the same
> > session variable change.
>
> > thanks
>
> > On Jun 22, 8:01 pm, "John David Anderson (_psychic_)"
>
> > <[EMAIL PROTECTED]> wrote:
> > > On Jun 22, 2007, at 11:55 AM, BoSc wrote:
>
> > > > anyone??
>
> > > Please don't bump an issue without trying a different approach. Make
> > > it more simple, supply more details. Something.
>
> > > Thanks,
>
> > > John
>
> > > > On Jun 21, 11:07 am, BoSc <[EMAIL PROTECTED]> wrote:
> > > >> Hi,
>
> > > >> I'm currently figuring out sessions on my develop environment (XP,
> > > >> Apache 2.0, PHP 5.0, newest Cake). Sessions don't seem to work
> > > >> however,
>
> > > >> I have a index inside a controller:
>
> > > >> function index() {
> > > >>  $this->Session->write('last_visited',$url);
>
> > > >> }
>
> > > >> which sets the url of the currect page (ofcourse the $url var
> > > >> contains
> > > >> the current url)
>
> > > >> when I do:
>
> > > >> function index() {
> > > >>  $this->Session->write('last_visited',$url);
> > > >> die(print_r($this->Session->read());
>
> > > >> }
>
> > > >> It shows the session with the current url (some/dir/goodpage), great
> > > >> you would say.
>
> > > >> but when I click a link on the index page, that should call some
> > > >> controller function:
>
> > > >> function delete() {
> > > >>  $this->redirect($this->Session->read('last_visited');
>
> > > >> }
>
> > > >> it does not redirect me to the previously set url.. so i thought the
> > > >> session wasn't saved, but after investigating:
>
> > > >> function delete() {
> > > >>  die(print_r($this->Session->read()));
>
> > > >> }
>
> > > >> the Session contains the set variable "last_visited" but the value
> > > >> has
> > > >> been changes to: (some/dir/favicon.ico/)
>
> > > >> Anyone got an explanation?
>
> > > >> thanks


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Session changes

2007-06-23 Thread BoSc

I'm sorry...

But what more detail is there to give? I set a session variable, test
if it is set by echo'ing it in the same controller, which works like a
charm. But when I try to echo it from an other controller, it has been
changed to something different. The funny thing is that it is set to
the name of the favicon, favicon.ico. Because I was using a sort of
generic name: last_visited, i tried changing it to somthing less
obvious sadkj3423 or something, and that still results in the same
session variable change.

thanks

On Jun 22, 8:01 pm, "John David Anderson (_psychic_)"
<[EMAIL PROTECTED]> wrote:
> On Jun 22, 2007, at 11:55 AM, BoSc wrote:
>
>
>
> > anyone??
>
> Please don't bump an issue without trying a different approach. Make
> it more simple, supply more details. Something.
>
> Thanks,
>
> John
>
>
>
> > On Jun 21, 11:07 am, BoSc <[EMAIL PROTECTED]> wrote:
> >> Hi,
>
> >> I'm currently figuring out sessions on my develop environment (XP,
> >> Apache 2.0, PHP 5.0, newest Cake). Sessions don't seem to work
> >> however,
>
> >> I have a index inside a controller:
>
> >> function index() {
> >>  $this->Session->write('last_visited',$url);
>
> >> }
>
> >> which sets the url of the currect page (ofcourse the $url var
> >> contains
> >> the current url)
>
> >> when I do:
>
> >> function index() {
> >>  $this->Session->write('last_visited',$url);
> >> die(print_r($this->Session->read());
>
> >> }
>
> >> It shows the session with the current url (some/dir/goodpage), great
> >> you would say.
>
> >> but when I click a link on the index page, that should call some
> >> controller function:
>
> >> function delete() {
> >>  $this->redirect($this->Session->read('last_visited');
>
> >> }
>
> >> it does not redirect me to the previously set url.. so i thought the
> >> session wasn't saved, but after investigating:
>
> >> function delete() {
> >>  die(print_r($this->Session->read()));
>
> >> }
>
> >> the Session contains the set variable "last_visited" but the value
> >> has
> >> been changes to: (some/dir/favicon.ico/)
>
> >> Anyone got an explanation?
>
> >> thanks


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Session changes

2007-06-22 Thread BoSc

anyone??

On Jun 21, 11:07 am, BoSc <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm currently figuring out sessions on my develop environment (XP,
> Apache 2.0, PHP 5.0, newest Cake). Sessions don't seem to work
> however,
>
> I have a index inside a controller:
>
> function index() {
>  $this->Session->write('last_visited',$url);
>
> }
>
> which sets the url of the currect page (ofcourse the $url var contains
> the current url)
>
> when I do:
>
> function index() {
>  $this->Session->write('last_visited',$url);
> die(print_r($this->Session->read());
>
> }
>
> It shows the session with the current url (some/dir/goodpage), great
> you would say.
>
> but when I click a link on the index page, that should call some
> controller function:
>
> function delete() {
>  $this->redirect($this->Session->read('last_visited');
>
> }
>
> it does not redirect me to the previously set url.. so i thought the
> session wasn't saved, but after investigating:
>
> function delete() {
>  die(print_r($this->Session->read()));
>
> }
>
> the Session contains the set variable "last_visited" but the value has
> been changes to: (some/dir/favicon.ico/)
>
> Anyone got an explanation?
>
> thanks


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Session changes

2007-06-21 Thread BoSc

Hi,

I'm currently figuring out sessions on my develop environment (XP,
Apache 2.0, PHP 5.0, newest Cake). Sessions don't seem to work
however,

I have a index inside a controller:

function index() {
 $this->Session->write('last_visited',$url);
}

which sets the url of the currect page (ofcourse the $url var contains
the current url)

when I do:

function index() {
 $this->Session->write('last_visited',$url);
die(print_r($this->Session->read());
}

It shows the session with the current url (some/dir/goodpage), great
you would say.

but when I click a link on the index page, that should call some
controller function:

function delete() {
 $this->redirect($this->Session->read('last_visited');
}

it does not redirect me to the previously set url.. so i thought the
session wasn't saved, but after investigating:

function delete() {
 die(print_r($this->Session->read()));
}

the Session contains the set variable "last_visited" but the value has
been changes to: (some/dir/favicon.ico/)

Anyone got an explanation?

thanks


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: HABTM relationship and meta-data in link-table

2007-06-20 Thread BoSc

Does this allow me to update the join-table, also the columns that are
not really part of the HABTM association?

Also, at the moment I solved this using the Has Many --> Belongs to
<-- Has many method. The solution was to use the recursive variable.

thanks for the help so far.


On Jun 20, 1:59 pm, Joshua Benner <[EMAIL PROTECTED]> wrote:
> I did something similar, where 'faculty' has and belongs to many
> 'activity' and each link has a student count associated with it -- I
> used a custom finderQuery in the definition of the association to pull
> the student count field with all the other data (TSQL, so some minor
> differences from MySQL, and this works with cake 1.2):
>
> var $hasAndBelongsToMany = array(
> 'Activity' => array('className'  => 'Activity',
> 'joinTable'  => 'activity_links',
> 'foreignKey' => 'faculty_id',
> 'associationForeignKey' => 'activity_id',
> 'unique' => true,
> 'finderQuery' => '
> SELECT
> [Activity].[id] as [Activity.id],
> [Activity].[name] as [Activity.name],
> [Activity].[activity_type_id] as [Activity.activity_type_id],
> [Activity].[credits] as [Activity.credits],
> [ActivityLink].[students] as [Activity.students],
> [ActivityLink].[id] as [Activity.activity_link_id]
> FROM
> [activities] AS [Activity]
> JOIN [activity_links] AS [ActivityLink] ON [ActivityLink].
> [activity_id] = [Activity].[id]
> WHERE
> [ActivityLink].[faculty_id] = {$__cakeID__$}
> ORDER BY
> [Activity].[name] ASC'
>   )
>
> On Jun 20, 6:03 am, BoSc <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I have three tables:
>
> > cities
> > categories
> > categories_cities
>
> > The first two are normal tables, the third one is used for linking.
> > Since I want to be able to indicate if the link is active, I've added
> > a column active to the categories_cities table. Using HABTM I am not
> > able to access any data of the categories-cities table caus it's used
> > for linking only. Is there any way to do make this work?
>
> > I've considered using the Has Many, Belongs to method, but in someway,
> > using the findAll method doesn't return data in a deep enough
> > recursive way.
>
> > Any thoughts?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



HABTM relationship and meta-data in link-table

2007-06-20 Thread BoSc

Hi,

I'm using a HABTM relationship between two tables (Cities and
Categories, a city could have multiple categories and the a category
can belong to multiple cities), but I need to be able to indicate of
the relationship between the two tables is currently active. Therefor
I've added a column in the link_table (categories_cities) that keeps
the status of the active link. The main idea is that this way for a
certain City I can disable the specific category so it doens't show up
on the site.

Is there any way to accomplish this using the HABTM method, or should
I consider the link_table as a serperate model and use Has Many and
Belongs to relationships?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



HABTM relationship and meta-data in link-table

2007-06-20 Thread BoSc

Hi,

I have three tables:

cities
categories
categories_cities

The first two are normal tables, the third one is used for linking.
Since I want to be able to indicate if the link is active, I've added
a column active to the categories_cities table. Using HABTM I am not
able to access any data of the categories-cities table caus it's used
for linking only. Is there any way to do make this work?

I've considered using the Has Many, Belongs to method, but in someway,
using the findAll method doesn't return data in a deep enough
recursive way.

Any thoughts?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: updating records without forms

2007-06-18 Thread BoSc

Thanks, works like a charm.

The problem was I didn't know how to create a reference to a certain
row, so this line helped me crack it: $this->Country->id =
$item['Country']['id'];

Thanks.

On Jun 18, 7:23 pm, "John David Anderson (_psychic_)"
<[EMAIL PROTECTED]> wrote:
> On Jun 18, 2007, at 11:15 AM, BoSc wrote:
>
>
>
> > Hi,
>
> > I want to use a update function in my controller that flips a boolean
> > field only.
>
> > I call the page withhttp://website/mode/flip/slug
>
> > When this function is called, it should check whether the database
> > entry for "slug" in "model" contains a 0 or a 1, additionaly it should
> > write the opposite value back. How should I accomplish this?
>
> > i used
>
> > $item = $this->Country->findBySlug($slug);
>
> $this->Country->id = $item['Country']['id'];
>
> if($item['Country']['nameofbooleanfield'])
> {
> $this->Country->saveField('nameofbooleanfield', 0);}
>
> else
> {
> $this->Country->saveField('nameofbooleanfield', 1);
>
> }
>
> You'd want to throw in some error checking (to make sure the Country
> with the slug is found, etc.), but this is one way you could do it.
>
> -- John


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



updating records without forms

2007-06-18 Thread BoSc

Hi,

I want to use a update function in my controller that flips a boolean
field only.

I call the page with http://website/mode/flip/slug

When this function is called, it should check whether the database
entry for "slug" in "model" contains a 0 or a 1, additionaly it should
write the opposite value back. How should I accomplish this?

i used

$item = $this->Country->findBySlug($slug);

to access the data, but this leaves me with an array instead of an
object.

Is there any other way to instantiate a object with a similar function
like findbyslug which allows me to make changes in the data $this-
>Country->boolean = 0, and then $this->Country->save(), to execute the
changes?

thanks

ps. as you might have noticed I'm pretty new to CakePHP, but I'm
trying to make the swicth.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



using Subdomain to differentiate page-content

2007-05-18 Thread BoSc

A bit of a cryptical description, but here goes.

Suppose I use a Cake app. to show the content of different cities,
Normally I would use a city controller dat accepts some parameters
like: domain.com/citys/show/newyork (to show city 1)

What I would like is to use a subdomain to indicate which city to
show:

newyork.domain.com/city/show (to show city new york)

I've already read some options of wildcard DNS and stuff like that.
That is all clear to me, except the fact, how to transform the
subdomain into a parameter for a certain page. Also it's important
that the address bar always shows city.domain.com

Thanks


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---