Lice Helper Launched

Posted on Mon 01 March 2010 in Development • Tagged with CakePHP, Portfolio

Recently finished and launched a new website for a client. The website advertises a lice removal service and provides means for potential customers to learn about the service and get in touch with the business quickly and easily. Lice Helper The site is built on a CakePHP application and actually ...

Continue reading

CakePHP Getting Tree Path

Posted on Fri 25 July 2008 in Development • Tagged with CakePHP

In a reversal of yesterday's post is today's, getting a path to a node, or nodes. Basically we just use the core getpath() function of the Tree behavior and traverse that path.

function setTreePath(&$data, $path='tree_path', $label='name') {
    if (!is_array($data) || !in_array('Tree', $this->actsAs)) {
        return $data ...

Continue reading

CakePHP Tree Find By Path

Posted on Thu 24 July 2008 in Development • Tagged with CakePHP

Wrote these little functions to help with finding tree nodes by specifying a path of values. For example if we had a tree of categories with similar names like TVs->Color and Movies->Color, we can't find by the category name since its not unique, but we can search ...

Continue reading

CakePHP Lightbox Helper

Posted on Tue 22 July 2008 in Development • Tagged with CakePHP

Made a helper to output lightbox compatible links, since the core HTML helper was not working. Stick the following code in app/view/helpers/lightbox.php:

class LightboxHelper extends AppHelper {

    var $helpers = array('Html');

    function img($thumb, $full, $imgAttributes = array(), $linkAttributes = array()) {
        $defaultLinkAttributes = array('rel'=>'lightbox');
        $linkAttributes = array_merge($defaultLinkAttributes, $linkAttributes ...

Continue reading

Using Radio Buttons with CakePHP

Posted on Tue 17 June 2008 in Development • Tagged with CakePHP

There's sparse documentation on this topic so here I give some example usages. Say we have a Posts model like in most of the cake documents. Basically what we do is make an options array available to the template that contains the keys and values for the radio button ...

Continue reading