This forum is for assistance with theme development.

node_url or node->path

for theming my flexinode I used:

$doc_link = eregi_replace("^node.","",db_result(db_query("SELECT src FROM {url_alias} WHERE dst = '%s_doc'", substr($node_url,1))));

somewhere. First I used $node->path but this was emtpy using an anonymous user. then I changed using node_url but now on my hosted site this is empty as well.

Do I have to initialize them somehow?
What is the right way to get the url from a node, working for all users?

More Teaser Themeing in CCK

So thus far Content Templates have been serving me quite well in terms of getting the output of my CCK content types to look as I want it to. But now I'm running into something that I have no clue how to do. I know I can create a .tp.php file to theme a particular node type (how I did it before Contemplate) but I don't recall (and couldn't find) any way to theme the title of a teaser, or really a teaser at all. I am basically looking to dump the teaser and display one of my Imagefields in the teaser. What I've got so far (with Contemplate) is the Imagefield with a title above it.

Background for preview of post

Looked through the css file for the BlueMarine theme and could not find the line that would allow one to change the background of the preview field that you get when content is posted. Where is this housed in the CSS file?

_smarty_variables

I'm trying to follow the example listed here:
http://drupal.org/node/70249

To that end, I have added this to smartytemplate.php

function  _smarty_variables($hook, $variables) {
 switch($hook) {
	case 'node-flexinode-3' :
		$vars['hallow'] = 'Hello, World!'; 
	break;
	case 'node' :
		$variables['newvar'] = 'new variable';
        	$variables['title'] = 'new title';
        break;
	}
 return $vars;
}

And I've added this to node.tpl

$picture not outputting to blogs or blog teasers...

Why is this? If anyone could clue me in I'd be very grateful... thanks.

I've searched the admin area to make sure pictures in posts were enabled everywhere and here is my node-blog.tpl.php code:
Note: I'm positive the users in question have user pictures. They just aren't being outputted to the node.

About Creating a separate admin theme

About Creating a separate admin theme

http://drupal.org/node/52389

I made two file that name is page-admin.tpl.php and page-login.tpl.php .I wanna jump to ?q=admin derectly when I logined,not jump to ?q=user/1 page. How can I do? very appreciate!

Pages

Subscribe with RSS Subscribe to RSS - Theme development