need 4 preface section

Events happening in the community are now at Drupal community events on www.drupal.org.
Anonymous's picture

I start loving Acquia Marina since i found Drupal for its beauty and multiple regions, but now I'm facing the problem to add a preface region to the three originals.

I would like to have 4 preface regions 'cause I have 4 topics of the website and it would be a great stuff to position 'em in the preface bar.

Do you have any idea or can anybody please help me?

Thank you very much

Comments

Which version?

sgprs's picture

First; Are you using 2.x or 3.x? There's a difference in the layout since the new 3.x branch is using the Fusion base as core. I assume you're using 2.x, so here's what you'll need to do:

You need to define the new region in the .info file (acquia_marina.info). Open it and you'll see preface first, middle and last. Just name your new section "Preface 4", or whatever you'd like. Add it in under "Preface Last", so it'll look something like this:

regions[preface_first] = preface first
regions[preface_middle] = preface middle
regions[preface_last] = preface last
regions[preface_4] = preface 4

Save and close. Now open you page.tpl file. Scroll down to <div id="preface"> . Now add in $preface_4 ||. It should look like:

<div id="preface">
    <?php if ($preface_first || $preface_middle || $preface_last || $preface_4 || $mission): ?>

Now scroll under that section to the processes. It's the section that starts with <?php if ($preface_first): ?> .
You'll need to define the new preface. The easiest way to do this is to copy your preface_last id, starting with:
<?php if ($preface_last): ?>
And ending with:
<?php endif; ?>

Paste it under the preface_last id and change all references of preface_last to preface_4. Your finished code alteration should look like this:

<?php if ($preface_last): ?>
          <div id="preface-last" class="column">
            <?php print $preface_last; ?>
          </div><!-- /preface-last -->
          <?php endif; ?>

          <?php if ($preface_4): ?>
          <div id="preface-4" class="column">
            <?php print $preface_4; ?>
          </div><!-- /preface-4 -->
          <?php endif; ?>
        </div><!-- /preface-wrapper -->
        <?php endif; ?>
      </div><!-- /preface -->

That's it! You now have a fourth preface block. Navigate to your block setting and make sure the new section is there.
NOTE: You'll need to make some css changes to get it lined-up correctly, as it will default under the first preface section.

Let me know if you have anymore questions... and good luck!
Chris

Thanks

corp82's picture

Thank you Chris,
yesterday I finally did it. I thought that I might also include one js slideshow instead of 4 regions as an alternative offer to my client, would be this easier to configure or do you know if there are any bugs?
Do you recommend some particular drupal slideshow module or is it better to write it by myself?

Thaks a lot anyway.
Pietro

Great, Pietro! As for the

sgprs's picture

Great, Pietro!

As for the slideshow: There are a few good one's, so I wouldn't bother with the trouble of writing your own. I use Frontpage Slideshow by Joomla Works and personally, I think it's by far the best out there. Of course, it's not free like most others. I believe it's around $30. I bought it some time ago and am extremely satisfied with it. It's VERY easy to use, comes with several different templates, which are all configurable. I tweaked the css in mine to get it where I want it, but that's a piece of cake. Plus, there's a Drupal helper mod available for it too. Here's the website: http://www.frontpageslideshow.net/

Another good one is Views Slideshow, but it can be a pain at times and as we all know, Views definitely isn't the easiest thing to use (although you can't be without it!).

Featured Content Slider - http://drupal.org/project/content_slider - is pretty good. I used it at one point. Very easy to set up and configure... but very basic and not very flashy.

Dynamic Display Block - http://drupal.org/project/ddblock - Another very good one and very popular. Looks good, flashy, impressive... but not very easy to set up and get running. Also not really that easy to mod. I seemed to always have problems with it. But it's worth a try. If you can get it running, it's very nice.

Those are the only one's I have experience with. Overall, none can top Frontpage Slideshow. Not free, but worth every penny. Plus, you can use it in other sites for future clients.

I also use a simple Flash slider on some pages as well. If you want, you can take a look at Frontpage Slideshow running on a personal site of mine that I'm in the process of designing for my company: http://tvdelicio.us/tv/paranormal
And here's where I used the flash. It's just a simple basic little Flash preface: http://tvdelicio.us/tv/Paranormal/Ghost-Adventures

Try those out and see what you think. Let me know if you need anything else!
Chris

Issue with new Preface

m3suriya's picture

as per the instructions i have done some to add new preface... for my
; $Id: acquia_marina.info,v 1.2.2.1 2009/05/25 09:33:09 jwolf Exp $

i have added two extra prefaces under preface_last
regions[preface_4] = preface 4
regions[preface_5] = preface 5

and in the page.tpl.php i added following code under $preface_last

      
<?php
if ($preface_4):
?>
<div id="preface_4" class="column">
<?php
print $preface_4;
?>
</div><!-- /preface_4 -->
<?php
endif;
?>
<?php
if ($preface_5):
?>
<div id="preface_5" class="column">
<?php
print $preface_5;
?>
</div><!-- /preface_5 -->
<?php
endif;
?>

but still i cant see my regions in the admin block to assign menus to that prefaces.
what will be the issue with my code???

Thanks & Regards
UDAY

TNT Themes

Group organizers

Group categories

Type of post

Group notifications

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