I've watched a million videos and read a million tutorials trying to figure out how to create a new variable for use in a version of a node.tpl.php file by utilizing preprocessing functions, but can't figure out what I'm doing wrong.
First, I copied the node.tpl.php file, renamed it node--nameofnodetype.tpl.php, and saved it in my theme folder. Then, I edited the template.php file, trying different variations of the following code.
function theme_preprocess_nodename(&$variables, $hook) {
$variables['link_name'] = 'link content';
}
I flushed the cache, and when I tried printing the new variable in the new node file, I got nothing. Can anyone tell me what I'm doing wrong?
node.tpl.php
present fornode-[whatever].tpl.php
to have effect?