Here we will be looking at how to add dynamic data (entries fro ma database table) to a drop down list using Yii?s Chtml listData. Let?s imagine that we have a database table called countries and we want to add a drop down list menu to our view which displays the country name and passes … [Read more…]
In this example, we have a Cars table, as well as a Dealers table. A dealer has many cars. I want to show the (single) Dealer view, but also all of the cars that belong to this dealer in a grid on the same page. Here’s how: In your Dealer model, you should have something … [Read more…]
Here’s how to implement simple and easy search functionality on an index page: Let’s say your controller looks like this:
Now that Gravatar support is part of the WordPress core adding them into your WordPress theme is easy. Adding them to your comments has been documented. How about adding them to your post titles to highlight the comment author? Within the loop? That?s fairly easy too. Here?s the code: Pretty simple, huh? get_the_author_email outputs the … [Read more…]
Watermarks are easy to create using three CSS style properties: background-image background-repeat background-attachment You use background-image to define the image to use as your watermark, background-repeat to make it display only once, and background-attachment to turn it into a watermark.