Questions tagged with elements

2 answers

1 vote

Asked by dpm1661, on 4/1/10 in Views

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...

0 answers

0 votes

Asked by capo64, on 15/5/10 in Helpers

Getting a form element corresponding to a model find

I'm implementing some JavaScript into one of my views, and I was wondering if there's a way to get a form element that corresponds to an array returned from a model find.

For example:

$customers = $this-Customer-find('all');

returns some elements...

1 answer

0 votes

Asked by imendars, on 22/7/10 in Views

Multiple Web Parts in 1 layout

I have 2 menus. One of them can be simple element since it doesn't use any db data.

The other menu uses database. so it will have multiple views to get more menu items in it, but how to CONSTANTLY SHOW IT IN PAGE?

I have read some interesting...

1 answer

0 votes

Asked by bmckim87, on 18/8/10 in Views

Best Practice Question: Layout or Elements

For each view I want to have an action bar that goes right under the banner. The action bar will contain actions applicable to that controller such as "Add Employee" or "View all Customers".

My first thought was to just have a request action in...

2 answers

0 votes

Asked by pastryking, on 20/8/10 in Views

Error with helpers in an Element

I am working on this application, whenever i call an ajax action to update a div in an element I get:

Call to a member function link() on a non-object in /Applications/MAMP/htdocs/jekajo/app/views/elements/playlist.ctp on line 2

on line two I have:...

1 answer

0 votes

Asked by dasparadoxon, on 26/8/10 in Views

Elements in Subdirectories

Hi, i have the urge to organize my elements in subdirectories, but I dont want to add the path to the element rendering command.

I changed my view class so it scans subdirectories in the elements folder if its not found there like normal.

Anyone...

2 answers

0 votes

Asked by freecode, on 17/10/10 in Views

elements + css + js

How to add a specific css or javascript file in a elements ?

It possible to add with $html->css('mycss','',array('inline' => false )) ?

thanx

1 answer

0 votes

Asked by jamie, on 29/10/10 in Controllers

Show data from 2 unrelated controllers in 1 view

How do I show image thumbnails from a works table on multiple content pages including home page without creating a foreign-key relationship or HABTM? After looking at solutions - loading a new model, class registry init - the only thing that...

2 answers

0 votes

Asked by pandinus, on 2/11/10 in Models

Load an element via ajax

Hi,

I want to load different elements within a view, via ajax, when a user clicks a corresponding link (similar to tabs). I've been through the cakephp documentation but can't find an example. I'm assuming that I can accomplish this with the...

0 answers

0 votes

Asked by dole, on 12/11/10 in Views

How to speed up elements display?

Let's assume that I have a database with all the products from a store and a view will contain an element with all the letters from the alphabet. When the user will choose a letter, i wish to display all the products which start with that...

0 answers

0 votes

Asked by sitonico, on 18/1/11 in Views

Showing an input in a view depending on role

Hello to you all!

I have a fat view (add) with a lot of inputs (it's a form).

For a role , there is a user_id input that is necessary, but for another role it isn't necessary. Here it comes my question, I know that elements are used for this kind...

0 answers

0 votes

Asked by DarkMachina, on 3/2/11 in Views

Accented characters not appearing in my view

Good evening,

I am using elements in my layouts. One of these elements is my navigation menu. Within this navigation menu there are some accented characters such as "é è ç à". When I call my view I see that nothing is outputted, the whole string...

0 answers

0 votes

Asked by shobha, on 23/2/11 in Components

We have to call component function from a element?

Hi guys,

We have a situation in our cake project which is a single page display, so here we are calling new layout which has different elements which again call different actions of different controllers. So we are tryimg to call a component...

0 answers

0 votes

Asked by corsen2000, on 24/4/11 in Helpers

Including JavaScript From Element

Hello,

I am very new to CakePHP and am only a novice using PHP.

I am trying to write a custom element that I can include in my layout and other places. The element needs to include jQuery and some other script files. I want the script files to...

0 answers

0 votes

Asked by caboone, on 16/5/11 in Controllers

[SOLVED] CakePHP problem with find function - Returns duplicates

The problem was somekind of bad relation that I am trying to understand:

I have the following relation in my articles.php model file:


var $belongsTo = array(
        'Category' => array(
            'className' => 'Category',
           ...

1 answer

0 votes

Asked by yogesh, on 4/8/11 in Views

How to add form elements dynamically

I need to create a form which acts as questionnaire, admin can create questions with different kind of answers like checktext, radiotext and he should be able to add/delete textbox, radio buttons etc. How to do this in cakePhp and get their...

2 answers

0 votes

Asked by betseyb, on 12/9/11 in Views

splitting a form across multiple elements??

I have a fairly complex form to get information from my users. Right now, each user gets the entire form, exactly the same way. We want to change the form so that the users might see the different pieces in different orders, or only see 3 of...

0 answers

0 votes

Asked by eiji11, on 27/11/11 in Models

why on earth (or maybe bakery) can't I use eval along with view helpers and elements?

<----code----


<?php
eval(<<<EOD
        echo $this->Html->link(__('START UP COMPANY', true), array('controller' => 'pages','action' =>...

1 answer

0 votes

Asked by satishkumar, on 22/12/11 in CakeQS

Hi friends, i am using linux-mint os i have to put a search form on front-end on my web's home page: i have done something like this:

Model for my app:

var/www/project/app/model/search.php

<?php

class Search extends AppModel {

var $name = 'Search';

}

?

My controller :

var/www/project/app/controller/searches_controller.php

<?php

class SearchesController extends AppController {

var $name =...

1 answer

0 votes

Asked by Xoubaman, on 10/2/12 in Plugins

Load plugin element from subfolder in Cake 2.1

When requesting elements from a plugin, doc says that $options['plugin'] was deprecated in v2.1 and support for plugin syntaxis was added.

So, to echo an element form within a plugin, you should use


echo $this->element('Plugin.element');

But, if...

<< previous 1   2