Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By beGeorge on
I have created three variations on node.tpl.php
node--9.7.tpl.php
node--9.6.tpl.php and
node--9.5.tpl.php
In order to see the variables and their content in the specific nodes on the live page I used print_r ($content);
And it worked as I hoped it would, for a while.
Now the display of variable content is gone, as are the other hard coded content words I put in. The site is behaving as though the variations of the node.tpl.php were not there.
There is one node.tpl.php for each custom directory.
This worked find before I deleted one of the nodes, and recreated it.
Any suggestions?
Comments
What does the 9.7 (etc)
What does the 9.7 (etc) represent? What is the 9 and what is the 7?
What does 9.7 represent
The date the blog was submitted. Would this work better with only one number?
It seems very fragile to base
It seems very fragile to base a template on a nodes creation date. How are the templates different?
How nodes are different
Each node has it's own set of images which are displayed in different areas on the page. Also, I am using responsive design techniques, meaning the image width is displayed as a percentage of the div area, so the prepossessing of the image has to be redone as well, to remove the sizing that Drupal puts in there by default, and replace it with my custom sizing attributes.
Problem resolved -
Thanks. Changed my approach.