zen of coding

Speed up your pagination with a simple hack…

Before I go into the example in this little post, let me just say that this situation won’t be applicable to everyone… But let’s consider the following: We have a table with tens of thousands of records, that need to be paginated. As you know, cake will execute two queries;[…]

Read More »

Dealing with static pages v2 (or… 3?)

Over the years of cake development we’ve seen a number of ways to get rid of the the /pages/ path in the URL for static pages. By default if you create an “about us” page, such as in app/views/pages/about.ctp, the resulting URL would be: www.example.com/pages/about I’m sure you’ve seen a[…]

Read More »

Be mindful of the redirect(s)

Just a couple of tidbits about CakePHP redirects, prefix routing and Auth. 1. Auth mysteriously redirects your logged in user into the abyss… After you’ve checked all your setting in beforeFilter()’s of App Controller and relevant Controllers, it still seems like a completely bizarre situation where all of a sudden[…]

Read More »
%d bloggers like this: