This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CakePHP Block Helper | |
// Ever wanted a clean way to capture a block of HTML in your CakePHP view and use it later in your layout just like CakePHP uses $content_for_layout? | |
// I use Rails all the time and take content_for for granted. I recently started a CakePHP project and noticed the absence of a simple content_for method to capture a block of HTML. | |
// For this example we are creating a helper named $cake, a controller named 'main', and using a layout named 'app'. | |
// HELPER: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CakePHP Block Helper | |
// Ever wanted a clean way to capture a block of HTML in your CakePHP view and use it later in your layout just like CakePHP uses $content_for_layout? | |
// I use Rails all the time and take content_for for granted. I recently started a CakePHP project and noticed the absence of a simple content_for method to capture a block of HTML. | |
// For this example we are creating a helper named $cake, a controller named 'main', and using a layout named 'app'. | |
// HELPER: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CakePHP Enkoder | |
// USAGE: | |
// Uses the same syntax as $html->link($title, $url, $htmlAttributes, $confirmMessage, $escapeTitle) | |
<?=$enkode->mailto('Email Me', 'user@example.com', array('subject'=>'Hello world!'))?> | |
// HELPER: | |
// app/views/helpers/enkode.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Open bash.rc in Terminal using the 'mate' command | |
mate ~/.bashrc | |
# Do you have this line in your .bashrc file? The PostgresApp should have added PostgresApp to your PATH. | |
PATH="/Applications/Postgres.app/Contents/Versions/9.3/bin:$PATH" |
NewerOlder