RantFever 4

I pontificate but not in the pejorative sense of the word.

Laravel 4 Packages

Posted 11 June 2013
Category Laravel

Over the weekend, I created my first package using Laravel 4.

No more bundles

Laravel 4 just came out at the end of May 2013. When it did, L3 users noticed quickly that bundles were long gone. Replacing bundles are packages. Are packages better? I have idea. I do know that they can be distributed via packagist and composer. Maybe that is why they made the switch. But really, it is all the same to me since I never really got much into L3.

Why build a package at all?

Good question. Packages are a way to add functionality to an application. But really, they are more than that. A package can have its own config files, models, views, controllers, routes, et cetera. So really, a package can be an app all by itself. HMVC, anyone?

I have a few web apps that I wrote in Codeigniter that I wanted to redo in a more cohesive way. So I created a L4 web app that I intelligently named Portal. Portal is a parent app to the other apps that I want to recode. The apps are distinct enough that they need their own configs and controllers but are related enough that it sort of makes sense to put them under the same umbrella.

Read More »

Theming: When LESS Is More

Posted 3 April 2013
Category PyroCMS

Four themes came with my PyroCMS by default. I liked them. They were good. Still, you can't just leave the default theme. Even though the default themes look good, you don't want to look like every other default Pyro install out there.

A default situation

I began with the minimal theme. It had the fewest styles, so I copied the folder and named my new theme "rantstyle." It used 960gs as a base to the CSS. I blew away the stylesheets to start over from scratch.

There are only a few basic files needed to make a theme in PyroCMS. There is a theme.php file that has the basic theme info: who created it, what version it is, urls, etc. There is also a views folder where the layout of the site is held. It is a templating system that uses handlebars to embed or import what they call partials. So I can create a default layout that has the basic html structure I want and then insert a { { theme:partial name="metadata" } } to include anything I have in the metadata partial, which, in my case, is everything that would go in the <head> element.

As I learn more about PyroCMS, I like the simple design. Things seem to make sense so far.

Read More »