Questions tagged with helpers

2 answers

1 vote

Asked by paplo81, on 23/12/09 in

How can I extend the core helpers ?

How can I extend the core helpers ?

I need to use new options in function $form->create() and others methods in the Form helper.

Thank you,

Paolo

2 answers

1 vote

Asked by dpm1661, on 4/1/10 in

How do I access a Helper from inside an Element?

I created a helper function that automatically generates an image for me (using GD), writes it to a file in the images directory, and then returns an image tag for the image.

The generated image is a progress meter, so it is general enough to be a...

2 answers

0 votes

Asked by oravla, on 28/1/10 in

How do I create various checkboxes for an list of items in a form?

<?php echo $form->input('CategoriaAtendimento'); ?>

This echoes a list with all the items on CategoriaAtendimento, can any1 tell how do I echo a "checkbox list" instead? plz

1 answer

0 votes

Asked by MichaelMafort, on 29/1/10 in

Has way to fixed the pagination params in navigation, by default?

I'm learn about cakephp and not find properties to set the pagination to keep the params into args url.

Example:

List users, ordered by name and I'm in second page, clicked in edit, data has edited and click to save, data has been saved! I want to...

0 answers

0 votes

Asked by hiromi, on 14/2/10 in

FormHelper::create() now generate acion attribute that not contain id param?

Hi, I am wondering a explanation for the FormHelper enhancement of following url.

http://cakephp.lighthouseapp.com/projects/42648/13-migration-guide

It says:

Default urls generated by form helper no longer contain 'id' parameter.

I guess

Maybe...

1 answer

0 votes

Asked by waterschaats, on 17/2/10 in

html entities

I want a link with a span inside. like this: <a href=''>linktext

When I use this the span tags are converted to html entities(<span class="text"&gt)

$html->link($title . $html->tag("span", null, array('class' => 'welcome')), $url);

1 answer

0 votes

Asked by shahid, on 19/2/10 in

Is there any helper or plugin for blogging to use with cakePHP?

Is there any helper or plugin for blogging to use with cakePHP?

2 answers

0 votes

Asked by Ponch316, on 3/3/10 in

How to make Paginator sort Strings as Ints

Hello,

I have a list of basketball players, whose numbers go from '00' to '99'. For this reason, I'm saving them as varchar on my database.

When I try to sort by Player.number, MySQL obviously sorts as varchar (1, 11, 12, 2, 20, ...).

Is there a way...

2 answers

0 votes

Asked by imasubmarine, on 6/3/10 in

is there a way to display mysql SET datatype as multiple checkboxes on views ?


CREATE TABLE set_test(
    id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
    myset SET('Travel','Sports','Dancing','Fine Dining')
  );

Form Helper automagic renders it as textarea (cakephp 1.2.6).

Is there a way to render myset as multiple...

1 answer

0 votes

Asked by dimis283, on 24/3/10 in

helper and models

I want to use a model (and a function of this model ) at my helper,how can I do that?

for example

{{{

$post = new Calendars();

$post->findArticlePostedThisMonth()

}}}

1 answer

0 votes

Asked by erick2red, on 25/3/10 in

JsHelper and Cakephp 1.3

Hi:

I'm start using cakephp and i made a demo app using AjaxHelper


$ajax->link('title', 'url', array('update' => 'mydiv'))

Now i want to migrate that to cakephp 1.3 and AjaxHelper is deprecated on cake 1.3 and will be removed, so i want to...

0 answers

0 votes

Asked by sankaman2k, on 12/5/10 in

Howto access helper from core email component view?

I've created a shell task that I call from the crontab.

It works great except it breaks when I use the EmailComponent in conjunction with any helper. Example:

I use EmailComponent to send an email.

In views/elements/email/html/myemail.ctp I am using...

1 answer

0 votes

Asked by beda1708, on 13/5/10 in

help on linking javascript

how to solve the following error ?

Notice (8): Undefined variable: javascript [APP\views\layouts\default.ctp, line 50

i have following the instructions on ajax helper in cakephp manual (7.1)

echo $javascript-link('prototype');echo...

1 answer

0 votes

Asked by GrzegorzPawlik, on 31/5/10 in

Why does Form::hidden drops class for input?

Why can't I do this:


$this->Form->hidden("name", array("class"=>"someClass"));

FormHelper drops class name I want to pass. Why is it that way?

1 answer

0 votes

Asked by bartje545, on 6/6/10 in

Can´t include helpers and components in app_controller

Hello,

When I put the following in my app_controller:


    var $components = array('Auth', 'Session');

I get no errors, and I can use the components.

But when I put the following:


    var $components = array('Auth', 'Session');
    var $helpers =...

0 answers

0 votes

Asked by Ryders, on 27/6/10 in

What am I missing in $script_for_layout..

ref:Inserting Well Formatted elements # css

Using cake 1.3, I'm trying to load scripts and css from a view or an element using inline=false. For instance, I have $this->Html->css ( 'adm-navigation', null, array('inline'=>false) ); in the...

1 answer

0 votes

Asked by atalon1, 3 weeks, 4 days ago in

Html link helper with internal anchor and parameter

Hi,

I use a link in my view as following:


<?php echo $html->link('Update list', '/controller/action/parameter'); ?>

But I would like to scroll the page displayed by this link to the anchor "#there" which is at the botton of the page.

I tried...

0 answers

0 votes

Asked by GeoffW, 3 weeks, 2 days ago in

$number->format()

Help! I am trying to format numeric data in my view. I am attempting to use the $number-format(number,options) helper.

Can someone show me a real-world example of this function being used? It is used in the view, correct? I have made a ton of...

0 answers

0 votes

Asked by Ragnis, 2 weeks, 1 day ago in

Cake doesn't load custom helpers

After I moved from a shared hosting to a VPS cake 1.3.2 does not load

custom helpers.

All core helpers are loaded, but not my custom helpers.

I my controller i have

public $helpers = array('Session', 'Html', 'Form', 'Access',

'Recaptcha');

When i try...

<< previous next >>