Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Senior Member
    Join Date
    Aug 2006
    Posts
    131
    Member #
    13656
    I'm pretty new to drupal but decided to use it for a website that I am developing. Right now I'm have a little bit of trouble theming the site. I am very fluent in the Wordpress realm of themeing and because of that am hitting some roadblocks. As of now, the best of my knowledge Drupal only has a couple of variables that are used to display content, such as
    • $content;
    • $sidebar_left;
    • $sidebar_right;
    What I am looking to do is have more control over what gets displayed on the front page. I have things like

    • Featured products
    • A featured blog article
    • Some random Call to action graphics
    • Product Category List
    Being that I'm familiar with Wordpress I know that I can do things like

    <div id="featuredproducts"><!--php code goes here--></div>
    <div id="featuredblogarticle"><!--php code goes here--></div>
    etc. etc.

    It seems like Drupal doesn't follow this themeing metaphor. Do I need additional modules to accomplish what I'm referring to? If so, which ones should I get? Any help would be appreciated.

    Thanks...
    Christopher Carvache
    Web Developer / SEO
    Northeast Web Design
    +1.860.906.7802

  2.  

  3. #2
    Senior Member Trico's Avatar
    Join Date
    Feb 2004
    Location
    Nottingham, UK
    Posts
    894
    Member #
    5081
    Hi,

    Drupal displays content in 'blocks' which you assign to the different 'regions' within your page. You do this under the admin panel > blocks.

    The variables you listed are actually the page regions available to you, depending on how many you code into your theme. These are the different locations you can assign additional <div>blocks.</div>

    For example you might have <div id="block-user-3">My featured products</div> rendered on your page using the block admin page.

    To achieve this you could either install a custom module that create the block contents for you, or alternatively you can create your own block from scratch using html/php. "Add block" from the block admin page. You give it a logical/recognisable name and then assign it to the region you want it to appear using a drop down menu, choices are typically (left_sidebar, header, content, footer or none) etc.

    Some blocks in your theme you might want to hard code into the template such as navigation that you want to appear on every page. The advantage of creating content through blocks is that you can turn them on / off depending on the page, which is useful as the majority of a Drupal site is run off the page.tpl.php file.

    The irritating thing I find about blocks is that Drupal assigns obscure css id names that you don't appear to be able to change. It makes styling a theme rather unintuitive. Newer versions might be different?

    Here are a couple of images that help illustrate the points above.

    Trico

  4. #3
    Junior Member DrunkMunki's Avatar
    Join Date
    Aug 2010
    Posts
    9
    Member #
    23337
    if you wanted to have a unique front page, and then have a general theme throughout the site i suggest you use the Front Page Module

    Or you can use the Views 2 Module to create it, which is my preferred way.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:57 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com