If you're not doing any advanced routing then this should work:
?php echo $html-link('Go', '/users/index'); ?
On 23 May, 15:21, Abhishek abhishek...@gmail.com wrote:
Hi,
When i use this to generate the a link
$html-link('Go',array('controller'='users','action'='index'));
The link
In your Post model set the dependent key to true on the hasMany
relationship.
var $hasMany = array(
'Comment' = array(
'className' = 'Comment',
'foreignKey' = 'post_id',
'dependent' = true,
)
Hi Kyle,
I've hacked together a helper based on the TextHelper methods that
should do what you're looking for...
http://bin.cakephp.org/view/1261676226
Save it to app/views/helpers/autolink.php and include it in your
helpers array:
var $helpers = array('Html', 'Form', 'Autolink');
And in
20, 11:03 pm, Andrew McCafferty andrew.mccaffe...@gmail.com
wrote:
Hi Kyle,
I've hacked together a helper based on the TextHelper methods that
should do what you're looking for...
http://bin.cakephp.org/view/1261676226
Save it to app/views/helpers/autolink.php and include it in your
Hi Kyle,
Here's a function you could try in your Post model -
http://bin.cakephp.org/view/607120740
I've given it a default of 5 tags if called with no params. Obviously
you can change this to suit or override it when you call it from your
controller.
e.g. $this-Post-postCountByTagCount(2)
Create login.ctp in /app/views/layouts then tell your action to use
it.
function login() {
$this-layout = 'login';
}
I'm guessing this is what you want. If you give us a bit more
information you'll probably get a better answer though :-)
On 27 Dec, 17:44, mona poojapinj...@gmail.com wrote:
Mona,
On Windows... cd to your app directory then run ..\cake\console\cake
bake
On Linux/OS X...you can set up your bash_profile then just run 'cake
bake'
What OS are you using? What have you tried? What's the error
message?
On 27 Dec, 17:45, mona poojapinj...@gmail.com wrote:
It is not
The SQL log is displayed when debugging is set to 2 or above. Open
config/core.php and set Configure::write('debug', 1);
To get alternating row colors you can use the modulus operator in
PHP. If you use bake, you'll see an example in an index.ctp view.
...
?php
$i = 0;
foreach ($posts as
If you want to stick with Prototype, I've used this in the past:
http://www.tetlaw.id.au/view/blog/table-sorting-with-prototype/
It's really straightforward to use, just include the JS and add the
relevant class to your table headers.
Demo here:
you suggested, unfortunately I still get the error
mentioned above.
Cheers.
On Apr 18, 10:22 pm, Andrew McCafferty [EMAIL PROTECTED]
wrote:
Firstly, the $name of AppController isn't Nodes so remove that
line...
Try replacing it with:
var $uses = array('Node');
This should tell
...Also
Make sure you restore cake/app_controller.php back to its original
empty state:
?php
class AppController extends Controller {
}
?
On 20 Apr, 17:15, Andrew McCafferty [EMAIL PROTECTED]
wrote:
I've just noticed the path to your app_controller.php file - it should
be placed in your app
Firstly, the $name of AppController isn't Nodes so remove that
line...
Try replacing it with:
var $uses = array('Node');
This should tell AppController to use your Node model, making the
findAllThreaded function available.
On 18 Apr, 06:17, double07 [EMAIL PROTECTED] wrote:
Hi All,
I'm
Hello All,
I'm getting some strange behaviour in Firefox only when using $ajax-
observeField to watch a SELECT dropdown. If the observed dropdown
list is opened and you hover over a selection, the event is fired
after the amount of time specified by 'frequency'. In other words,
you get an ajax
Thanks Mandy!
This could be the one that drags me away from HTMLKit for good. I've
only been playing with it for a few minutes but it looks great. Cake
support would just be the icing on thewell...cake.
Andrew
On 24 Jan, 12:18, Mandy [EMAIL PROTECTED] wrote:
Well, this post is not
!
Andrew McCafferty schrieb:
Thanks Mandy!
This could be the one that drags me away from HTMLKit for good. I've
only been playing with it for a few minutes but it looks great. Cake
support would just be the icing on thewell...cake.
Andrew
On 24 Jan, 12:18, Mandy [EMAIL PROTECTED
Uwie,
I'd take a copy of cake/libs/controller/pages_controller.php and paste
in into app/controllers/
Add the following into app/controllers/pages_controller.php:
var $layout = 'your_custom_layout';
Create 'your_custom_layout.thtml' in app/views/layouts/ and hopefully
Bob's your uncle :-)
Thanks Samuel - That looks very useful.
Samuel DeVore wrote:
http://start.gotapi.com/
note cake has a place here, actually a nice way to search the api.
Sam D
--
==
S. DeVore
(the old fart) the advice is free, the lack of crankiness will cost you
Felix,
In my /app/views/errors directory, i've created the following files
error404.thtml
missing_action.thtml
missing_controller.thtml
missing_view.thtml
These override the default cake error pages (which you can find in
/cake/libs/view/templates/errors)
Perhaps I misunderstand your question
18 matches
Mail list logo