Hello.
I new in using PHP for theming.
I would like to change the web site logo just for one page called "special page" (and its translations).
I made a subtheme of Zen, in Drupal 7.12, Ubuntu Linux.
In page.tpl.php , I wrote:
if( $title == "special page") : $logo = file_create_url(file_build_uri('images/special_logo.png')) ; endif;
In the source code of my page, I can see the right URI to that special logo, but the picture doesn't appear on the page and, if I read that URI in my browser, I get a Drupal page saying:
Page not found
The requested page "/sites/my_site.asia/files/images/special_logo.png" could not be found.
On the second and last comment of that page, I read:
For private files at least. You will need to implement hook_file_download() to allow the file to be downloaded. Otherwise you will get a file not found page.
Firstly I've never done that, secondly is it possible to implement such a function in a template? If yes, how should I name my function? What to do? Maybe my method is completely wrong…
Thank you for any help.
Comments
No one?
No body has any idea?
http://Fiable.biz Web site creation.
Usually the following code is
Usually the following code is used for showing logo,
In this case if you want to change logo for just one page, you can do it by using following condition
Where arg(0) and arg(1) is,
if your url is like yoursitename.com/content/specialpage
arg(0) is content
arg(1) is specialpage
path_to_theme() and $base_path, together form yoursitename.com/sites/all/themes/
/images/imagename
Hope this will clear your problem