I had two models, “Example” and “ExampleModel”, linked with belongsTo – hasMany relationship.
The problem was, after baking, the dropdown selection for ExampleModel in Example’s add and view pages were totally blank. Yet, in the index page, the data is shown (which means that relationship is established correctly). Continue reading “Problem with linking models containing multiple words in CakePHP”
Here are the first set of basic applications that I installed in my Ubuntu environment. All the applications (including Ubuntu OS) took about 2 GB of disk space. If you are NOT planning to use Ubuntu on regular basis ,and just wanted to install essential applications that are not available in Chrome OS, the default 16GB of disk space is more than enough to install all for the following applications.
Continue reading “Chromebook basic tweaks and tips for Crouton”
How To Change Number Products Displayed Per Page
Insert the following code in your theme’s functions.php
// Display 40 products per page.
add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 40;' ), 20 );
Continue reading “WooCommerce 2.1.9 cheatsheet – product listing page”
How To Remove Related Products
Add the following code to your theme’s functions.php
//remove related products from single product page
remove_action ( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20);
Continue reading “WooCommerce 2.1.9 cheatsheet – single product page”
I purchased my first Chromebook. My new personal laptop.
I wanted something new. I wanted a laptop. I wanted a SSD. What I didn’t have was money in my bank accounts.
I went back and forth thinking “it may be worth inventing on a high-end device and keep it for a long time” and “who am I kidding I can’t keep any gadget for more than two years.” Continue reading “Chromebook for a web developer, is that possible?”
After four years with Verizon Wireless, I decided to give Republic Wireless a try. Their monthly plan would cut my cost significantly.
Our cellphone bill was average of $80 per month per line. Switching just one line reduce the cost by, at least, half even with the priciest plan Republic Wireless offer.
But before making the decision, there are things to consider. Continue reading “Republic Wireless – making the decision to switch”
Let’s see if I can make this tutorial simply and easy. The tutorials out there are lengthy and cluttered with non-essential elements to make the example visually pleasing. I wanted to make mine BARE MINIMUM so that I can see what CSS property are actually make the structure.
Key elements for HTML code:
- Top level menu’s UL tag – “top” class assigned
- Second level menu’s UL tags -“sub” class assigned
Key Elements for CSS:
- margin and padding reset – Browsers applies 16px to top- and bottom- margin, and 40px to left-padding. Let just get rid of those so you are not confused.
- list-style – make the bullet go away. It just looks too broken when they are there (this is NOT a contrubuting CSS property to make the horizontal nav structure)
- inline-block on ul.top > li – This HAs to be “inline-block”. Can’t be inline, can’t be block. Well, technicially it will work okay with just “inline” under Chrome browser, but messes them up with IE and FireFox.
- relative on ul.top > li – again this HAS to be “relative”. Making this element “relative” forces the “absolute” position of the submenu origin point to be this element .
- absolute on ul.sub – making it “absolute” will not interfere the flow of ul.top > li.
So this will get you started on building a horizontal navigation with drop down menu. Of course, this is just a starting point. You will need to decorate them, size them, position them, and add some behaviors to make it fully functional. But now you know which properties are being used to make the navigation structure.