Questions tagged with htmlhelper

1 answer

0 votes

Asked by patelnehal4u, on 13/5/10 in Components

problem using Html helper in Email layout

I am writing Forgot password functionality, where i am sending email to user with a new random password by using email component. My email has a default layout(/views/layouts/email/html/default.ctp) as following.


<!DOCTYPE html PUBLIC...

0 answers

0 votes

Asked by GeoffW, on 8/7/10 in Helpers

$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 techlands, on 19/7/10 in Models

how to make a link https/http with html helper

is there an option in html helper that allows changing of the protocol (http/https) without having to specify the full base url?


$html->link('always secure', array('controller' => 'c', 'action' => 'a'));

desired result:...

1 answer

0 votes

Asked by JaRo, on 2/9/10 in Helpers

Html link with image and text


<a href="#" title=""><img src="#" alt="" />Text here!!!</a>

How can I get this as cake html helper link?

SOLVED

Working example


$html->link($html->image('#') . 'Text here!!!', '#', array('escape' => false), null);

Thanks...

1 answer

0 votes

Asked by unts, on 5/10/10 in Helpers

not escaping html tags in link

I'm learning CakePHP from the well-known apress book, now I have to create a link and within the <a tags I should have h1 tags, in my view I have this...

1 answer

0 votes

Asked by suven.myopenid.com, on 17/10/10 in Helpers

$html and the pagepreaks

Hi all!

I'm in troube with the $html-helper.

When does $html add pagebreaks, when doesn't he and how to force him?

For example in my view.ctp I have:


<?php echo $html->docType('html4-trans'); ?>
<html xmlns="http://www.w3.org/1999/xhtml">
   ...

1 answer

0 votes

Asked by allencch, on 22/11/10 in Plugins

How to use HtmlHelper in plugin without mod_rewrite?

Hello, I have a problem in using the plugin without mod_rewrite. The

plugin I am now trying to use is "api_generator". Since I don't use

the mod_rewrite feature, I enabled


Configure::write('App.baseUrl', env('SCRIPT_NAME'));

And remove the...

1 answer

0 votes

Asked by nneuman, on 7/12/10 in Helpers

Leave any prefix routing while using Html-link

So I just switched on prefix routing on my site using 3 prefixes (admin,manager,user).

The Html helper link function now always generates links that are within the same prefix.

How can I generate a link that will leave *any* prefix routing? Is...

0 answers

0 votes

Asked by macneti, on 20/4/11 in Helpers

inline => false loading of js files in elements

I have the problem, that $html->script('jsfile',array('inline'=>false)); is not working within a element. JS file is not loaded. only loading js files inline the element is working. someone a idea why? in cake version 1.26 this problem not happens.

0 answers

0 votes

Asked by snowrider81, on 3/5/11 in Helpers

How do I remove the wrapping div from a Form input of type select-multiple

I'm trying to adjust the output from


$this->Form->input('input', array(
'multiple' => 'checkbox', 
'div' => false, 
'label' => false
)

to remove the wrapper div around each checkbox.

Each checkbox is automatically output by the Form helper like...

2 answers

0 votes

Asked by bmartin, on 19/5/11 in Helpers

How can I override the Html->link function?

I have a need to add some logic to the Html-link function. I don't want to alter the cake libs or built in helpers for obvious reasons. Is there a way I can intercept a call to Html-link()? I don't want to replace the function with my own, as...

3 answers

0 votes

Asked by mensch, on 29/6/11 in Helpers

Why does a JavaScript file throw a PHP parse error?

I've got a strange problem with one of my JavaScripts included in a Cake plugin I'm developing. For some reason a JavaScript file is parsed as a PHP file, so loading the file throws this error, which is a PHP parsing error:


<b>Parse error</b>: ...

1 answer

0 votes

Asked by L4suicide, on 3/9/11 in Plugins

Do I need to change my links for my default layout?

If I navigate to a plugin page, for examples

localhost/plugin/controller/action

all my links go wrong

for example

$this-Html-link('Home', array('controller' = 'random','action' = 'index'))

would link to '/plugin/random' instead of '/random'

Do I need...

0 answers

0 votes

Asked by Lucky1968, on 5/9/11 in Helpers

How to show images that are not in the webroot/img/ directory?

Hi,

I'm using plugins that upload pictures to the specific /app/plugins/[pluginname]/webroot/files directory. Uploading works fine but showing the pictures with the Html-helper is apparently a problem.

Can someone tell me how to set the path for...

0 answers

0 votes

Asked by bmartin, on 13/9/11 in Components

How can I make the links created with the HTML helper non secure on a secure page?

I'm using the Security component and have set the $this-Security-requireSecure array to the 2 actions I want to use a secure connection. However, I want the links on this page to link back to a non-secure page. For example the logo, which would...

0 answers

0 votes

Asked by miCRoSCoPiCeaRthLinG, on 20/10/11 in Helpers

Overriding HTMLHelper in Cake 2.0

Hello,

I just completed migrating my app from Cake 1.3 to Cake 2.0 and enjoying the improved performance immensely. However, there are some issues I need to sort out.

I'm using a custom HTMLHelper that overrides the


scriptBlock() 

function of...

1 answer

0 votes

Asked by vaughany, on 29/10/11 in Views

Correct use of addCrumb in Html helper

Hi. I am currently using the following code snippet to create a breadcrumb navigation trail:

$this->Html->addCrumb('Admin', '/admin/images');

It is simple and easy to see what's going on, but I have read that this sort of syntax is...

1 answer

0 votes

Asked by alienx2.myopenid.com, on 4/11/11 in Helpers

use 2 array will give error

Hello... Im new to cakePHP and i like cakePHP... But i have problem with like div confuse to use 2 array.

code:


<? echo $this->Html->div($this->Number->format($data['Test']['price'], array('before' => '₱ ','escape' => false,'thousands' => ','...

1 answer

0 votes

Asked by alienx, on 5/11/11 in Helpers

image target _blank

I wonder why its doesnt work with target _blank with HtmlHelper image.. =(

<? // PROBLEM: TARGET isn't work

echo $this->Html->image('buy.png', array(

'alt' => 'Buy Now!',

'url' => '/buy',

'target' => '_blank'

)); ?>

2 answers

0 votes

Asked by andrew3719, on 22/2/12 in Views

htmlhelper input label problem

Dear baker ,

For normal convention naming for input as example $ this-form-input('username')

It will create view as. Username : [input] and when submit it will say save to table field username , but now i wAnna create input as . User : [input]...

<< previous next >>