This forum is for assistance with theme development.

Including other nodes on node-tpl.php

I'm making two sites at the moment, and with each I struggle with the same problem. I have been through theme developers quide and php snippets, but haven't find an answer yet. Here's the problem:

I need to make a page where I serve flexinode-1 to provide the body of the page (the basic information). Then I need 3 other flexinodes (flexinode-2, flexinode-3 and flexinode-4) of different types to display additional information. The additional flexinodes should be selected by user id of the flexinode-1. I also have the "slots" in the flexinode-1.tpl.php for the other flexinodes to display. So far I have achieved showing flexinode-1 and flexinode-2 at the end of the code of flexinode-1.tpl.php. If I place flexinode-2 on the middle or at the beginning of the template, it looses all the original info for the flexinode-1 after the flexinode-2 has been read.

The problem seems to be in the way I try to achieve this. The template uses php-snippet to get the info from another flexinode (display (x) full flexinodes), and I have tried to use $output=""; after and before the snippet.

Is there a way to do this nicely? Say by making a template that holds the relevant data and just instructs the "slots" to display one flexinode of each type where uid=uid of currently shown flexinode?

The flexinodes are not ment to be shown in any other context.

Any help and pointers would be greatly, warmly and wholeheartedly appreciated.

Placing the contents of a block in any location

Drupal Newbie question:
I'm experimenting with Drupal on a new site (http://www.game-boyz.com/drupal-4.7.2/ ) trying to show off a segment from menu (the Platforms). I have that built as a menu item that I've added to the left side bar block). I would rather add this menu item elsewhere on the page.

I tried this code:

Assigning content to regions

Hello, trying to divide the front page up into sections with subheadings that get content put under them according to their category. Added regions to my PHPtemplate, but can't figure out how to put content (not blocks) into them.

CSS - Can anyone recommend a good book?

I need to buy a book on advanced CSS. Does anyone have any recommendations?

andreas05 theme not showing in admin (clean urls)

I installed my first multi-site here:
http://eric.mystavash.net

(it's for my brother! He likes dragons so much he has 4 of them tattooed on himself. ^.^ I dunno whether he will use it or like it, but it's something to do.)

multisite wise, it's OK. But I keep running into problems with the theme not showing up where it should.

I think this is more the theme than Drupal, it's a port, so I have been fixing things here and there. Turned it into a table to get the dragon to show up properly.

However, when I turned on clean urls, the theme disappeared from the admin pages. mysite.net/admin was OK, but anything else, like the module page, and it went away.

I am thinking maaaaaaaybe it's in here from the page.tpl.php:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<meta name="author" content="Original design: Andreas Viklund - http://andreasviklund.com/" />
<?php #echo $styles; ?>
<?php echo $head; ?>
<link rel="stylesheet" type="text/css" href="<?php echo $directory; ?>/andreas05-alternate.css" />
<title><?php echo $head_title; ?></title>
<?php echo $head; ?>
</head>

but it's only the admin pages and only with clean urls.

sigh.

And yes, base url is ok, theme default is set. etc etc.

secondary_links on front page?

<div id="menu">
	<?php if (isset($primary_links)) { ?><?php print theme_menu_links($primary_links); } ?>
</div> <!-- end menu -->

<div id="sub_menu">
	<?php if (isset($secondary_links)) { ?><?php print theme_menu_links($secondary_links); } ?>
</div> <!-- end sub_menu -->

I am using PHPTemplate, and that code above is how I output my primary and secondary links as unordered lists.

Pages

Subscribe with RSS Subscribe to RSS - Theme development