Drupal panels

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
opegasus's picture

OMG! Do I love the panels module.

I haven't delved deeply into panels and mini-panels just yet but...

I was driving myself crazy coding my front page so I had a two panel gateway into two separate sites. Actually they are all on the same install and really just one site. I wanted two distinct pictures (jpegs) that represented each the site/side they were hyper-linked to and to have the text above centered. No matter how I Div'ed the node in the editor I couldn't get even and centered text nor the hyper-linking pictures satisfactorily positioned.

Then (finally) I remembered panels. After a quick tute on youtube, I was off to the races. Wish I had remembered Panels (from our class given by Andy Laken and Scott Rouse months ago) before hacking the node but it's all a learning process.

Needless to say Panels to the rescue! I could have saved a whole day of frustration. The main splash (landing) page is d-o-n-e !

Now on to the content and galleries...

Hope everyone has a brain storm before they go code crazy and you remember a module that does what you are attempting to do.

Comments

Thanks

scottrouse's picture

Thanks, again, Christopher for sharing your progress.

I will say, briefly, that Panels is a great module, but sounds like it may be a bit of overkill for the task you described. Laying out two linked images side-by-side on a website can be accomplished very simply using CSS. That approach may save you some real pain down the road when it comes to performance and load time on the site (as opposed to using Panels). Here's an example:

Let's say you're just using a simple node's content to represent the front page. In the node body, you may enter something like:

<div id="header-text">
     <p>My header text goes here. This is such a great website. Yay.</p>
</div>
<div class="image-group">
     <div id="image1">
          <a href="#"><img src="/sites/default/files/image1.jpg"></a>
     </div>
     <div id="image2">
          <a href="#"><img src="/sites/default/files/image2.jpg"></a>
     </div>
</div>

You'd want to replace the links and image address, obviously, and include the correct markup including alt/title tags and image dimensions.

The relevant CSS would be something like:

#header-text {
     text-align: center;
}

.image-group {
     width: 100%;
     clear: both;
}

#image1 {
     width: 50%;
     float: left;
}

#image2 {
     width: 50%;
     float: right;
}

Again, you're not wrong to use Panels to solve this problem. It is, in fact, what Panels was designed to do. It's just another important example of learning best practices for laying out content on a site.

Best,
Scott

Yes, Best Practices is..

opegasus's picture

...the way to go! Can't agree with you more.

Admittedly I was attempting to Div/style in the plain text editor (in that node) vs. using an outside style sheet. My CSS skills (among other scripting languages) is minimal and since I have been in a very pressured hurry I have succumbed to short cuts and letting modules (et al) do the heavy lifting. Since I am not fluent in CSS and I have to get work out, my time to learn-study is almost non-existent at this point in time.

Most of my learning time is with Drupal and the modules and that is just surface learning at best. I am sure I will look back on these days and see the time wasted would probably equal the time it would take to stop and learn the best practices way and keeping the web tidy.

Absolutely agree on all your points and many thanks for the comments, pointers and code!

For a pro web developer, CSS is just as important as Drupal

laken's picture

In some ways web development is a hard field to be in, or to be entering when your older than 17, because there are so many essential technologies at play, and it's difficult/impossible to learn them all at the same time.

There have always been assistive technologies that promise to take away the boredom/tedium/necessity of learning basic toolsets like HTML and CSS. Back in the 90's there was FrontPage, then Dreamweaver, and many others. "Make a web site as easy as using Word!" they promised. I myself predicted that better WYSIWYG editors would mean the end of hand-coding HTML/CSS. (My argument was that nobody writes Postscript from scratch, they use Illustrator/Pagemaker/InDesign. I was wrong.)

Now we have Wordpress, Blogger, Drupal, theme-generating services, PSD-to-theme services, etc. In all of this is the implicit promise that you don't need to learn HTML, CSS, PHP etc to be a web developer. However, I would say that a solid working knowledge of HTML and CSS is fundamental if you are someone who build sites for a living. You may not need to use those skills every day, but WP/Drupal/etc are squarely built on top of HTML/CSS, and without that knowledge you are severely hamstrung when it comes to customizations and basic troubleshooting.

Put another way, being a Drupal expert without a solid HTML/CSS base is like being an auto mechanic who can work on the car's computer system but doesn't understand how the engine works.

So yes, we need to have expertise in our CMS of choice, but IMO it's vital to know HTML/CSS well, they are the essential lingua franca of our craft.

A great place to start on this learning journey is Zeldman's Designing with Web Standards: http://www.zeldman.com/dwws/

Where is the like button?

opegasus's picture

Spot on Andy!

It was stressed in class (Nora) that a solid basic understanding of those languages is key to at least finding and repairing broken bits in addition to site building. Javascript was yet another coin tossed in the fountain.

So what is a person to do if they have to generate and income, need to spend all their time on marketing, communicating with potential (and actual) clients and have near zero time to learn?

Personally I can only grab snatches of small bits of time to learn a specific little bit of this or that as needed on an aspect of a site and then move on.

So for one, as much as I appreciate all the well intentioned advice, in practice it will just have to wait. Mayhaps others are much more fortunate than I and in that case I wholeheartedly agree with you and Scott.

Once I have enough liquidity and can breathe, then I will delve into the languages De Vivre with passion. I realize I am hobbled somewhat until that point. Rock and a hard spot my friend, may you never experience this. :-D

Western Montana

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week