Category: CakePHP

[CakePHP]How To Call Controller Action or Controller Function From Views Or Any Location

Hi Friends, While developing cakePHP web application we get so many problems and difficulties. Some days ago i got one problem in which I wanted to call controller action or controller function from view file. We can’t directly call controller function in view file. So I have found one function in cakePHP by which we can call any controller method/action/function…

Read More »

How To Make Link On Image In CakePHP

Hi Friends, After long time I am writing post. In this article I will tell you how to make link on image via in cakePHP. Making Link in cakePHP is easy but sometime we have to make link on image so it is little bit tricky, I have tried so much and after trying so many times I found one…

Read More »

CakePHP : How To Get Current URL In View In CakePHP

Hello Friends, Sometimes we want take current URL in cakePHP in view, Today I got current URL for transferring to that URL after log in. I have tried so many things to work it out and finally I got one working way to get current URL in view. We can use $_SERVER variable to get current URL but cakePHP giving…

Read More »

CakePHP : How To Not Include Layout In A View

Hello Friends, A layout contains presentation code that wraps around a view. Anything you want to see in all of your views should be placed in a layout.So your every view is wrapped by one layout,If you are not using including layout by $this->layout = ‘layout_name’; than every time it will use default layout, yesterday when I was working on…

Read More »

CakePHP : Load Other Model In Controller

Hello Friends, These days I am totally giving tricks and ideas relates to cakePHP and in this article I will also tell you how to load other model in other controller to use instantly. There are two ways to make available other model in controller, One is $uses variable in controller and other is loadModel function. $uses way is not…

Read More »

Optimize CakePHP Web Application By Element Caching

Hello Friends, I have written some articles relates to element and its use for an application that how cakePHP elements can be useful for web application. Now today I am again want to writing about cakePHP element for web application optimization. As we know that Many applications have small blocks of presentation code that need to be repeated from page…

Read More »

CakePHP: How To Include Element In View In CakePHP

Hello Friends, As I am writing some important stuffs on CakePHP, But today i want to share one simple and basic thing with you about cakePHP element that how can we include cakePHP element in view. Basically Many applications have small blocks of presentation code that need to be repeated from page to page, sometimes in different places in the…

Read More »

CakePHP : How To Make Image Submit Button

Hello Friends, CakePHP having form helper to make text box,forms ad any other HTML input, But today I want to make a image work as submit button because one of my submit button in project using image, So I want to submit form when anyone click on image button, I have tried to search on internet about it that how…

Read More »