I am currently helping my local PBS station redesign their website using a set of templates provided by PBS. It was decided that we should start using a CMS, and we chose Drupal to fill that role.
Here's the problem I'm having:
The template from PBS comes with four different pages. One frontpage-style, one similar to the front page but minus some elements, one like the previous one but with tabbed content, and one without a sidebar/second column. Here are examples of what the pages look like in the same order as above: Front page, Content Page, Tabbed content page, and One-column page.
What I cannot seem to find out is how to make this work. I have tried to do subthemes, but I don't understand it enough to make it work at all. I have set up a testing instance of D7 for working with the theme, and it can be found here.
But wait, there's more! How do you get the darned "submitted by..." to go away in D7? I can't find the option that all of my Google searching has pointed to.
Thanks in advance for your assistance, it is much appreciated!
Comments
To get the easier question
To get the easier question out of the way, to remove the "submitted by" information if you go Administration > Structure > Content types > Basic page and then look for the Display settings which should be at the bottom left of the settings page, uncheck that box and hit save content type. If you create any futher content types you'd obviously need to make sure that settings was unchecked on creation but now your Basic Pages will not show the unwanted information.
What may be of assistance to you for the page structuring that use tables is to install a wysiwyg module which will allow you to insert a table into your nodes "pages" a popular editor is http://drupal.org/project/ckeditor. Otherwise if you know html you could create the layout you want in whatever editor you use like Dreamweaver, paste the code into your node body and make sure the text format setting is changed to Full html when you save the node.
For tabbed content have a look at doing this with a module like http://drupal.org/project/quicktabs
To remove the sidebar/blocks on certain pages this can be done in the blocks settings page, you will probably want to set it to "display on all pages except" and the put the node paths in i.e node/1, guessing your using clean-urls?
There are quite a few ways to do what you've asked and various modules you may want to look into, Views, Panels or Context are pretty standard tools people use for layouts and overall page control which could be a good idea to look into. If you get stuck just ask.
Regards
Andy
Idea
I still don't know much of the terminology of Drupal, but I think I might have had a little breakthrough.
If I make part of the static-ish html into a block(?), can I have that display only on certain pages (e.g. the front page)?
Which brings me to another question. How do you define blocks? From what I've gathered they're defined by the regions[] lines.
I'll be doing some experimenting, but it seems to me like I might have stumbled upon something here.
Your better to ask and
Your better to ask and experiment than not so fire the questions in.
What you've basically got in your page.tpl.php defines where you can assign content to, this being the regions that you also specify in your info file. Say for example you have 3 regions setup in both your page.tpl.php and in your info file named sidebar_first, content and sidebar_second you can then assign blocks to these regions, i'm unaware that there is any limit to how many blocks you can have in one region but if there is i'm sure someone will provide that info.
Now, in your blocks settings in adminstration you'll see the default blocks that come with Drupal core and the regions you've specified in page.tpl.php and your info file. By selecting from the dropdown next to the block which region you'd like it to display in and saving your changes you will notice that the blocks will start showing in your site.
You can also create custom blocks by clicking that option at the top of the settings page, this is handy for displaying static html, images or you can run php code inside these as well. As you can probably grasp there's endless amounts of uses for those so no need for me to go into the list. With each block you can tell it to display on certain pages in that blocks settings. This is done by selecting how you want it displayed i.e all pages except x or only x pages.
Thats a basic summary of how blocks work without going into a silly amount of detail.
As said above ask if you have a question.
Andy
Setting up regions
One thing that has been bothering me since I started is this: I have to define regions in the .info file, but how do I designate where those regions are in the page.tpl.php?
Is that what something like
render($content);is for?It is my thinking that regions, blocks, and what-not are really only for dynamic content. Is that the 'best practice?'
Yeah, you basically add the
Yeah, you basically add the necccessary regions where they should be displayed in your html.
print render($page($header));That would print any block placed in the header region.
In terms of best practice that's how Drupal works, you assign a region, tell Drupal what to put inside the region, it displays what you've told it to. Not really much more to grasp than that, you just start asking it to do more complex tasks.