By jondkoon on
I am curious what php variables are available within a node. I want to be able to use $base_path from within a node. Any ideas?
I am curious what php variables are available within a node. I want to be able to use $base_path from within a node. Any ideas?
Comments
see Node.tpl.php
see Node.tpl.php (assuming you use the phptemplate engine)
Nodes via Website
I actually meant the individual nodes in a page. On my home page for example. If I click "Edit" and then use php input format what variables do I have access to within there?
I don't believe they are
I don't believe they are available there without doing something like this (to load the node object, you could use user_load for users, and project_load for profile, etc):
I'm not sure how to get the $base_url...
EDIT: i hit "post comment" too soon lol, you can get the $base_url like this:
===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime." -- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz