Archive | PHP RSS feed for this section

[CakePHP] Pagination options persistence

TweetEditing a record and redirecting to a paginated list is a very common workflow pattern in CakePHP. However there is a small problem with this pattern if used with default pagination. after editing the user is always returned to to the first page with the default order and default limit. This is not very user [...]

Read full story · Comments { 2 }

[How To] Create a component in Joomla – Part II

TweetIn my last blog post I wrote about How To Create a component in Joomla. The output text was hardcoded into the view. This doesn't follow the MVC pattern exactly because the view is intended to only display the data, and not contain it. In this second part of the tutorial we will demonstrate how [...]

Read full story · Comments { 0 }

[CakePHP] Back port Helper aliasing to CakePHP 1.2 and 1.3

TweetOne of the enticing new features of CakePHP 2 is Aliasing. What do you do if you need aliasing in CakePHP 1.2 or 1.3? Here is a guide to back port aliasing for helpers. For this guide we will overwrite HTML helper's link method to always avoid escaping of the title. To start with you [...]

Read full story · Comments { 4 }

[CakePHP] Saving HABTM data with tables in different databases

TweetOne of the powerful features of CakePHP is the model relationships. It handles relationships seamlessly and saves/finds data of related models on its own. The most complex among the relationship is the Has And Belongs To Many, often shortened as HABTM Recently I faced a problem in saving data for a HABTM model. The problem [...]

Read full story · Comments { 2 }