Re: can't pass variable to default.ctp

2012-01-17 Thread mklappen
Thanks for info, i was missing "parent::beforeFilter" in the pagesController. After adding that, setting the view variables from the AppController beforeFilter worked. On Jan 17, 4:26 pm, euromark wrote: > you shouldnt set any view vars to the view in beforeFilter > this callback is not always t

can't pass variable to default.ctp

2012-01-17 Thread mklappen
7;, $this->_loggedIn()); $this->Auth->allow('index', 'view'); } //works public function beforeRender() { $this->set('users_username', $this->_usersUsername()); $this->set('logged_in', $this->_loggedIn()); } default.ctp

Re: How to setup multiple HABTM relationships between two tables

2011-01-13 Thread mklappen
Thanks for replies... I added a two boolean columns to join table for "owns" and "wants" Thanks again!! On Jan 13, 3:13 am, Jeremy Burns | Class Outfit wrote: > You could consider adding a new column to your joining table that contains a > tinyint. By default the value of that field is 0 (which

How to setup multiple HABTM relationships between two tables

2011-01-12 Thread mklappen
Hi All I'm having a little difficulty conceptualizing the relationships when setting up a database/models, for a app I'm starting to develop. If I'm creating a basic inventory management application I have the following: Table Name | Columns users | id, user_name, email, etc... items | id, name,

How to incorporate site home page with custom cakephp cms

2010-01-19 Thread mklappen
I have created a fairly basic custom content management app using CakePHP that allows me to enter information into my database through a number of different web forms. (it's a gaming website that has game info, reviews, etc...). The app is named 'CMS'. I developed this mostly to learn the basics o

Re: neighbors sort

2009-10-01 Thread mklappen
omplicated function for it myself > not only for your problem, but for "correct" neighbors in general > > if you use UUIDs you dont have sorted IDs anyway > and sometimes you have to sort by more than just 1 field etc.. > > On 25 Sep., 17:27, mklappen wrote: > > &

neighbors sort

2009-09-25 Thread mklappen
Hi Is there a way I can sort a query and then have the find (neighbors) based on that sort? I'm trying to sort my results by title and then would like prev/next elements returned by neighbors to be the prev/next title in alpha order. However, neighbors is returing the prev/next ids which are not

Add/Insert data into two tables

2009-05-08 Thread mklappen
I have the following function set up in my GenresController. This function is called when a user is viewing a Game and wants to add a new genre to the DB and associate it with the game currently being viewed. The Game and Genre models share a HABTM relationship...I'm not having any problems addin

Help with Ajax form and CSS Styling

2009-04-14 Thread mklappen
Hi I'm having some trouble with a form that I have styled in my CSS but when it's loaded from an Ajax call it's not picking up the CSS styles view.ctp: used for viewing entries in my DB, I have "edit" links that link to specific actions in my contoller that allows users to update/edit DB entries.

Re: Help using special character « in paginator

2009-03-15 Thread mklappen
thanks! working now :) On Mar 14, 12:24 pm, brian wrote: > Add 'escape' => false to your params array. > > On Sat, Mar 14, 2009 at 12:45 PM, mklappen wrote: > > > Hi > > > Is there a way to use the special characters « and » in > > pagination cl

Help using special character « in paginator

2009-03-14 Thread mklappen
Hi Is there a way to use the special characters « and » in pagination class without cakephp converting the & sign into '&'? I found a couple posts on it here but they really haven't helped me figure out if/how it can be done... http://groups.google.com/group/cake-php/browse_thread/thread/a1963f

Re: Can you have multiple hasAndBelongsToMany relationships in one model?

2009-02-16 Thread mklappen
Thanks... I did try that but must have made a typo somewhere because it didn't work when I did. got it all working. Thanks again. On Feb 16, 6:00 pm, "Adam Royle" wrote: > var $hasAndBelongsToMany = array('Developer','Publisher'); > > ----- Ori

Can you have multiple hasAndBelongsToMany relationships in one model?

2009-02-16 Thread mklappen
Hi, I'm new to cake and this group, I would like to know if it is possible to add multiple hasAndBelongsToMany relationships in one model? ( I assume it is...) my declaration & first instance of it is working fine, however it's not letting me add another... example: Thanks in advance. mk --~-