I needed to arrange some of the fields (on the node page) differently than they default. I found the Display Suite Module which did the trick. But now I have an issue:

I have a block which shows up on node pages. I am trying to add some php script on that block which creates a url link based on the node #. The only way I know how to do this is by doing a variable set in the node--nodetype.tpl.php on the node variable I want, and then doing variable_get on the block page (I don't think the node object is otherwise available to the block).

However, when I tried editing the tpl file, nothing happened anymore, it didn't even give me an error when I put in invalid code. It seems the file was taken over.

So, I have two questions:
1) If I can't modify this tpl file, where is the appropriate one now?
2) Is there an eaiser way to do what I am describing?

Comments

vm’s picture

ds priovides it's own based on the layout you chose. ds tpl.php files are stored in ds/layouts. They can be moved to the theme folder and altered as needed (IIRC).

DS docs = http://drupal.org/node/644662

jdesrig’s picture

Do you know what variables are available in this tpl file? In the standard node.tpl.php file, I could use $content or $node to pull out the node nid, how would I do this here?

vm’s picture

i don't know off hand. quick googlin' seems to indicate that variables with DS beghin with $ds_ ie: $ds_content
you may need to take a look with devel.

custom layouts docs: http://drupal.org/node/1098068

jdesrig’s picture

I am actually also very new with devel. I know that I can click on the devel tab on the node page to see the content of $content (it doesn't say its the variable $content there, its just that I saw it in the node.tpl.php file), but in what way were you thinking about using devel to figure out my issue?

vm’s picture

perhaps the best place for your question at this point is in the issue queue of the ds module as a support request. I'm sure swentel and the subcommunity of users more familiar with it's innards will be of help.

nevets’s picture

If you are talking about a page that display just a node you can use

$node = menu_get_object();
if ( !empty($node) ) {
  // On a content/node page
}