Hello Drupal Community.

This is my first forum post. I have been experimenting with drupal for the last few months, getting used to the administration section and trying out various modules and themes. I am now creating my own theme for drupal, and a couple of questions have arisen. I also want to ask a couple of questions that have arisen along the way, although they may not be strictly relevant to theming as such.

Without further ado.

1. how do you create overview pages such as the main page? The only way I have found to do this is to use taxonomy terms, and when you click on a term it shows you an overview of related terms.

2. what is the point of being able to change away from /node? There is an option somewhere in the admin section for default path or something, what's the point of this?

3. how do you use cck? what exactly does it do?

4. similarly, how do you use views? what exactly does it do?

5. how do you change the default front page? Currently, if there are no posts promoted to the front page, Drupal gives the "welcome to your new drupal install". How do I get rid of this?

I think that is all for now. Your answers will be much appreciated.

All the best,

Finbarr

Comments

dnewkerk’s picture

Check out my guide on CCK and Views (and a variety of other Drupal topics) which should help you figure things out: http://www.davidnewkerk.com/book/18
Also check out this article I'm writing about the variety of ways you can make a custom Drupal home/front page: http://www.davidnewkerk.com/book/4

There are some videos which should help a lot as well:
http://mustardseedmedia.com/podcast/
http://learnbythedrop.com/drop/83
http://learnbythedrop.com/archives

ckng’s picture

I'm answering based on what I think should be simplest for beginner. Note that these are not the only way.

1 - There are a lot of ways, for beginner I would suggest try out panels module, where layout and putting pieces together would be simplest. Have the panels using a path says 'startpage', that's what you put into your Q2. Another way is to duplicate your page.tpl.php (other pages) as page-front.tpl.php (front page) and change the layout/display as you wish, so you get a differently look on your homepage, by generating content from blocks, views, panels or combination of them. Or you can code all the logic separating the frontpage and other pages all inside page.tpl.php, nothing stopping you from doing that.

2 - see Q1 panel. You can point it to anything with a path that generate content, including node, views, ...

3 - CCK is for creating new content type or add additional fields to existing one. E.g. the page content type, says you like to have an additional subtitle below the main title just like newspaper heading, use CCK to add the additional text field. E.g. 2 having a new content type called movie review, where you can have the movie title, cd cover image, star rating, link to imdb, etc. use CCK

4 - Views is a database query builder. Take movie review content type, you may want to generate a summary page showing highest rated movie, showing the fields title, cover image and rating only. Or a block of latest movie, with cover image only. Instead of coding the php and sql, views can help you generates it.

5 - The normal way is use page-front.tpl.php and remove the line of code where it says "print $content". Of course then you have to have other ways to display content on the front page.