[support] Reply
ALLAHBAKASH ALLAHBAKASH
allahbakash2 at gmail.com
Sat Aug 25 01:15:02 UTC 2012
Rl try to check the mistake you might have left some letters or
something make a tharow check then proceed you will do it.
On 8/25/12, Ursula Pieper <dramamezzo at gmail.com> wrote:
> I am trying to add an additional logo to my D7 site.
> I added to the template.php the following:
>
> function mytheme_preprocess_page(&$variables, $hook) {
> $theme_path = drupal_get_path('theme', variable_get('theme_default',
> NULL));
> $variables['second_logo'] = $base_path . '/' . $theme_path .
> '/images/second_logo.png';
> }
>
> and on page.tpl.php, I use the variable $second_logo, which correctly goes
> to:
> http://example.com/drupal_site/sites/all/themes/mytheme/images/second_logo.png
>
> This works fine for the home page:
>
> http://example.com/*drupal_site*
> /sites/all/themes/mytheme/images/second_logo.png
>
> However, when I am looking at a content page:
> http://example.com/drupal_site/content/whateverpage
>
> The url for the second logo gets constructed as:
> http://example.com/drupal_site/*content*
> /sites/all/themes/mytheme/images/second_logo.png
>
> So, I add the base path to template.php:
>
> $base_path = drupal_get_path('theme', variable_get('base_path', NULL));
> $theme_path = drupal_get_path('theme', variable_get('theme_default',
> NULL));
> $variables['second_logo'] = $base_path . '/' . $theme_path .
> '/images/second_logo.png';
>
> base_path, according to http://api.drupal.org/api/drupal/globals/7 is
> supposed to bet the base of the Drupal installation, which in my case is
> http://example.com/drupal_site/
>
> However, the path for the second logo gets constructed as:
> http://example.com/sites/all/themes/mytheme/images/second_logo.png
>
> instead of
>
> http://example.com/*drupal_site*
> /sites/all/themes/mytheme/images/second_logo.png
>
> D7.15, zen 7.15 sub-theme.
>
> What am I don't wrong?
>
> Thanks, Ursula
>
More information about the support
mailing list