This forum is for assistance with theme development.

Custom template for one page

Hi all,

I am new to this drupal system. I understand that you have a pasic template system. but i am looking to create one standalone page with hads a different layout to all the other pages in the site. The idea is to have a page that just takes in a few blocks. but is not a default template.

Is there anywhere to get this done or a tutorial somewhere?

thanks all

Removing xxx's blog from the posts

Please don't tell me to look at http://drupal.org/node/32050 for the documentation on how to do this, I already have, and it didn't work!

My issue is that when I un-check all the relevant boxes in the admin - themes - settings page, I still get xxx's blog coming up on all blog posts! I've also tried it with different themes, (including blumarine). Is this an installation problem, template? or module?

CSS help - I[m completely lost :)

OK so i've decided on an open source theme to develop my drupal site and am making steady progress.

I'm currently converting http://openwebdesign.org/viewdesign.phtml?id=2914&referer=%2Fmost_popula... and everything is now functioning the way i would have hoped apart from a few things that are driving me crazy.

The theme has a right and left content area. These are defined in css as

.left {
	float: left;
  width: 490px;
	margin: 0 0 10px 0;
}

.right {
	float: right;
	width: 245px;
	margin: 0 0 10px 0;
}

And function as they should. The entire theme is centre positioned at 760px.

Now what i'm trying to do is make my forums full 760px long by disabling the right column blocks when viewed.

I achieved this somewhat with hashing around with the CSS but it wasn't exactly very clean and potentially has problems later on.

I checked in page.tpl.php if content existed in the right column before displaying the

like so
<?php if ($sidebar_left) { ?><div class="right">
      <?php print $sidebar_left ?>
    </div><?php } ?>

Ignore the sidebar_left attribute its just the way the site was originally set on regions. It does go to the right :)

So the div doesn't display anymore. Perfect. But obviously the left content area is still set to 490px.

I did override this with

#forum table {
	width: 760px;
}

Created Theme, now strange problem with users logged in and out

I've created a really simple theme for a site, that uses one page.tpl.php file and that's it (along with stylesheets etc).

I've noticed that if I put "hello world" or something in the html of my page.tpl.php file, it is only visible when a user is logged in. When you're just looking at the site, you can't see the text, when you are logged in you can.

template.php

If I have to theme just this from page.tpl.php print theme('links', $secondary_links) , what is the right approach? I don't want to hack menu.inc/common.inc as some solutions.

Of course I could break up the creation of secondary_links in page.tpl.php itself, but I want to override the appropriate function. I just don't know what function.

I suppose the file would be template.php. What would the function name be? Or do I have to create a file bluemarine_? Why do we use one over the other? This always confuses me!

Detect user logged in

I have a block of links, one of which is "Log In". I wish to change this to "Log Out" once the user, any user, is logged in. The easiest way I know to do this is to just have a little php code:


if (userLoggedIn) echo "Log_Out_link";
else echo "Log_In_Link";

Does such snippet of code exist? I tried searching the site but came up empty handed.

If there is a better way to do this, I would also like to know, but this way suits me just fine.

Pages

Subscribe with RSS Subscribe to RSS - Theme development