Creating a single custom template with no columns, 2 columns, or 3 columns
- Details
- Posted: October 12, 2010
Two people in two days have asked me the same question, so I thought I'd post my answer here.
Let's say you have a simple three-column design for your website. There's a left, middle, and right column.
However, you need variations depending on the modules assigned (or not) to the left and right columns. The middle column always displays the content for the page. This is where the component lives.
So, here are 4 snippets you can use to make this magic happen in your own template. I'm sure software engineers would find a way to combine them all and make them efficient... but I've left them spelled out so they're clear to the designer-types out there.
The variations covered below are:
- left, middle, and right
- middle only
- middle and right
- left and middle
&& means AND, i.e. both things are true.
Putting a ! in front of the parenthesis means the whole thing is the opposite. So ($this->countModules('right')) means if there are ARE right modules assigned to this page. If you say (!$this->countModules('right')) then that's if there ARE NOT right modules assigned to this page.
Each middle column (or main content area) has a different ID associated with it. My assumption is that you will need this so that you can adjust the width of the middle column to occupy unused space via CSS, and to leave space for the left and right columns.
I've also assumed there's a single module position called "left" in the left column and a single module position called "right" in the right column. Note that you could add more module positions as required, or you could put module positions in the middle column in addition to the component.
This code should work for both Joomla 1.5 and 1.6 templates.
Left, middle, and right columns
<?php if ($this->countModules('right') && $this->countModules('left') ) : ?>
<div id="left"><jdoc:include type="modules" name="left" style="xhtml" /></div>
<div id="right"><jdoc:include type="modules" name="right" style="xhtml" /></div>
<div id="mainContent"><jdoc:include type="message" /><jdoc:include type="component" /></div>
<?php endif; ?>
Middle column only
<?php if (!$this->countModules('right') && !$this->countModules('left') ) : ?>
<div id="mainContentonly"><jdoc:include type="message" /><jdoc:include type="component" /></div>
<?php endif; ?>
Left and middle columns
<?php if (!$this->countModules('right') && $this->countModules('left') ) : ?>
<div id="left"><jdoc:include type="modules" name="left" style="xhtml" /></div>
<div id="mainContentnoleft"><jdoc:include type="message" /><jdoc:include type="component" /></div>
<?php endif; ?>
Middle and right columns
<?php if ($this->countModules('right') && !$this->countModules('left') ) : ?>
<div id="right"><jdoc:include type="modules" name="right" style="xhtml" /></div>
<div id="mainContentnoright"><jdoc:include type="message" /><jdoc:include type="component" /></div>
<?php endif; ?>
Company Photo Day!
- Details
- Posted: September 21, 2010
Since we've hired Gwen as a full-time employee, once again, it was time to get company pictures taken.
And as always, we went to visit our old friend Tom Raffelt over at New England Studio. Tom is the only photographer who can make taking pictures fun for me. If you need some professional photos taken for your website, we always recommend Tom -- he does a great job, plus he's lots of fun to work with!
We wanted one photo of all three of us, plus individual head shots to appear on the site.
We brought along one inflatable penguin, which we got from Ryan Ozimek at Joomla Day New England. (Thank you, Ryan!!!) The penguin is the symbol of open source software, and it just seemed to fit the mood of what we were trying to achieve. We wanted to convey that we're fun and approachable, but we didn't want to be unprofessional.
The photo came out great!

Tom told us that he needed an hour to get things touched up in Photoshop and burned on a CD. As it was lunchtime, we went over to Fritz's...

As Mike Hoefer tweeted, "Three women walk into a restaurant with an inflatable penguin..."
Professional photos are so important for your website, so make sure you take the time and pay the money to get them done right. Just look at the difference between the first, beautiful photo, and my crappy cell phone photo just below, which is poorly lit and badly exposed. Unfortunately, we see photos like this on websites all the time.
Remember that photos sell the product. In this case, Gwen, Heidi, and I ARE the product. This photo has really improved the look of the 4Web site and we are very happy with the outcome!
Have you updated the photos on your site lately?
Welcome, Gwen Ames!
- Details
- Posted: September 21, 2010
4Web would like to welcome Gwen Ames, our newest addition!
Gwen is a 2009 graduate of the Marlboro College Graduate School Master's of Science in Information Technologies program. She recently relocated to the Keene area.
"Working with Heidi and Jen is so much fun," said Gwen. "I've learned so much over the summer, and the job is interesting and challenging every day. I'm always learning something new."
Gwen specializes in CSS and Joomla template creation.
Gwen also loves all kinds of new technology and gadgets. She is the proud owner of an iTouch and a Kindle, although she is still using a TracPhone instead of a real cell phone. But we shall keep working on her.
Joomla Ethics 101: Giving Back to the Joomla Project
- Details
- Posted: September 17, 2010
Joomla is free, like free beer, like free puppies. Many of Joomla's extensions are free. You can also find a ton of free templates.
That is a wonderful, amazing thing, that you can get software that, ten years ago, would have cost well over $100,o00 -- and it's all for free.
There are plenty of people downloading Joomla and building sites with it. That's pretty much what we do at 4Web, download Joomla and customize it for our clients.
We also make sure we give back to the Joomla project. To date, we here at 4Web have:
- founded Joomla User Group New England and actively participate in it
- With the significant help of the user group, organized and ran two Joomla Day New England events (and we're organizing a third now)
- Written articles for community.joomla.org
- Participated in the Joomla forums
What have you done to give back to the Joomla project? There are so many ways you can participate.
Anyone can do these at any time
There is always work to be done in these areas at the Joomla project, and anyone can assist according to their ability level.
- Assist answering questions in the Joomla Forum. Make a goal to answer at least two questions for every question you ask.
- Help write Joomla documentation at the wiki. From the wiki home page: You don't need to join the Documentation Working Group to help us improve the documentation. Just register on this wiki and get started. Feel free to fix any errors you find; take a look in the Cookie jar; or consider helping out in one of our mini-projects.
Join the Bug Squad
The Joomla Bug Squad (JBS) is the group that tests for bugs and squashes them when found. JBS is very active now with Joomla 1.6 in its beta state.
Speak languages other than English?
The translation team can use your help if you do.
Form a Joomla User Group
- How to Start a Joomla User Group, part 1
- How to Start a Joomla User Group, part 2
- Officially registered Joomla User Groups
Google Groups Mailing Lists
Follow discussions of Joomla development and the Bug Squad.
- Explanation of these groups
- Joomla General Development list
- Joomla! CMS Development list
- Joomla Framework Development list
- Joomla Bug Squad
Social Networking for Joomla
- people.joomla.org, Joomla's official social networking site
- Joomla's Facebook page
- A list of popular Joomla people on Twitter
- There are several LinkedIn groups:
Joomla Ethics 101: Just because it's an ebook, it still costs money. Pay for it.
- Details
- Posted: September 17, 2010
We've all heard about the music pirating going on around the web. Why pay 99 cents for a song when you can download it for free? All of those musicians are rich and famous anyway, so why would they care if I take a copy of their song?
Likewise, there's a bunch of ebooks out there. Those book authors must also be rich and famous. Why would they care if I get their book for free somewhere?
I take posts like these very personally. Why? Because you're stealing from me.
I wrote a book because I felt like I had a book in me, and I wanted to share what I know with you. I enjoyed the process, but in the end, I probably only made $5/hr for doing it. Tech book authors don't get rich writing books. But I am a teacher at heart, and I very much enjoyed the process. It was fun, so I did it.
My book sells for about $40 list price. In most cases, you can purchase it for about $25, whether that's a paper book or an ebook of some kind.
What benefit is this book to you? Well, I teach you all of Joomla, from start to finish. You could take what's in that book and build 20 page websites without any stretching at all. There are plenty of people who build 10-20 page websites, and they make a decent living doing it.
What do you charge for that website? $500, $1000, $1500, $2000? Even if you're only charging $500 (you should really charge more), your $25 upfront cost has benefited you 20 times. If you're charging $2000, you got an 80x return on your investment.
And I got nothing, even though I taught you how to do everything.
Where's the fairness in that?
If you don't pay for books, then people won't write them anymore. You'll have to make do with the free content around the web. That's not to say free content is terrible. There's lots of great free content that documents Joomla well. (I hope you find some on this website.)
However, when a publisher puts together a book, or a company like Lynda.com puts together a series of training videos, there is a LOT of work that goes into these. Facts are checked. Typos are corrected. Testing is done -- can the example be followed? Is the outcome of that example as advertised? Does this book/video live up to the quality, and can we call it our own?
You pay for that when you buy a book or pay for watching a video. And in general, you get none of those benefits when you consume free content.
If you can't afford these training materials, then please, stick with what's free around the web.
But it seems to me that you'll recover the cost of your ebooks and training videos the very first site you build for a client.
Don't be cheap. Don't steal. If someone has taught you how to do something, thank them by purchasing their product legitimately.

