Hi there,
I'm new to Drupal theming (I'm more a Wordpress themer)so I'm looking and trying to get my way through the theming process for a Drupal website.
So here's the thing, I have a small blog website to make for a small customer and he want's his front page to have small parts of the entire site, so basically what should be on the front page are these blocks:
- About Me
- Latest News
- Latest Mixes (yes he's a DJ ;p)
- Photo Gallery
All of these parts are already coded in plain HTML.
I understand the work process for a Drupal theme because it's very similar to Wordpress (at basic level).
I'm struggeling and looking for a way to show these blocks on the front page of his website and I don't find a usefull documentation of how to get this done.
The About me page is going to be a Page not a Story, so how to show this block on the page along with the rest?
And how about to show the rest (latest news etc...)?
Comments
When using blocks you can
When using blocks you can specify the page that it needs to show up on.
Blocks >> Block_Name >> Configure
Then check out the "Page specific visibility settings." For it to show only on the front page use "".
Ideas by Nature
www.ideasbynature.com
Also, If you want to have
Also,
If you want to have specific design changes for the front page only. You can do this buy copying "page.tpl.php" and renaming it "page-front.tpl.php" and then make your changes this will effect only the front page. Its pretty similiar to wordpress. Your theme must also use phptemplate.
Ideas by Nature
www.ideasbynature.com
Thanks for the reply. I did
Thanks for the reply.
I did this but which variable will actualy print this out? I've just tried
print $content;but then I get the "configure your website stuff" and the block that I've just created.On page.tpl.php to show
On page.tpl.php to show blocks you need to have the region printed so
print $region_name
that will print all of the content in that region including blocks.
Also, you might want to check out views so you can have dynamic content instead of manually updating it.
Ideas by Nature
www.ideasbynature.com
Hi, I decide to join in and
Hi,
I decide to join in and ask my question here, since I need to modify the layout of a node.
I have been advised to copy the page-front.tpl.php file and name it node-[nid]-page.tpl.php for a starting point.
I just want to change the layout slightly of each language page which I will create when I have the content.
At the moment, our front page i.e. homepage has a Header, a Navigation bar, a Banner region, and then the main container with a sidebar-left, a Content Top and a Content bottom, a sidebar-right as well as a Footer and a Closure.
I only want to get rid of the sidebar-left, since I want to simplify the layout of the main container to only 2 columns instead of 3 then (sidebar-left, content in the middle and sidebar-right).
Here is some of the code where I think that I need to modify something:
I'm not sure what to do. Do I need to create another class? How can we see where the sidebar-left is?
Any suggestions or help welcome, as it is my first time doing something like this!
Thanks
Hey, Can you paste the code
Hey,
Can you paste the code from the whole page? You need to find the Sidebar-Left Div.
Another thing you could do if you don't want to modify code is use path alias and give it to all of the node types and then use the block visibility settings.
Show on every page except:
node-type/*
Ideas by Nature
www.ideasbynature.com
There is none. That's the
There is none. That's the problem. The Front page i.e homepage has 4 boxes instead of a content with 2 sidebars (left and right).
So, how can I specify that I want a sidebar-right then with a main content on the left then?
I was thinking of using this code that I have just found on the forum and replace the word left by right to make the right sidebar show:
Here's the full code of the page, but there isn't any sidebar-left or right. May be I should use a copy of the page.tpl.php instead?
Code for the page-front.tpl.php:
Yeah, I believe you can just
Yeah, I believe you can just do instead of node-[type].tpl.php, do page-[node-type].tpl.php.
That should fix you problem. Sometimes you have to add some custom code to the template.php
Check this out.
http://drupal.org/node/249726#comment-1935604
Ideas by Nature
www.ideasbynature.com
Hi, Thanks. I guess that the
Hi,
Thanks.
I guess that the only way of finding out how it's going to look like, is actually to create one.
I don't feel too confident to mess around with variables. If I use that solution, how can I still make appear a 2 column layout?
It's not that clear to me.
Hi again, I have tried to
Hi again,
I have tried to modify the page above and also tried to change the page-[node-type].tpl.php but without any success.
Could someone let me know how I can customize this page. Feel free to comment the code above.
I only want a main content with a sidebar-right. No sidebar-left.
I thought that it would be more straight-forward than that, but obviously, it is not working out for me!
I have found a way to have the layout I want by using Firebug and I can see that it seems possible by using css. But how can I link the css file to this new node-[nid]-page.tpl.php or page-node-type.tpl.php
Hope that I'm making sense right now.
And thanks for your help and time
If you just want to use css I
If you just want to use css I like to use conditional statments like.
Then in your main content you do main-content.sidebar-right #sidebar-left {display:none;}
Or however you get the point.
Ideas by Nature
www.ideasbynature.com