Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6884649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:32:07+00:00 2026-05-27T05:32:07+00:00

I want to display two different logos on my drupal site: one for the

  • 0

I want to display two different logos on my drupal site: one for the front page and one for the inner pages.

if (drupal_is_front_page()) { 
    $variables['logo']=drupal_get_path('theme', 'hanna') . '/images/logo.png';
  } 
   else {
    $variables['logo']=drupal_get_path('theme', 'hanna') . '/images/logo-inner.png';    
  }

This works just fine for the front page and any page which has websiteurl/page as URL; however, it doesn’t work for the pages where the URL is similar to websiteurl/custompath/page.

I think the problem lies in the relativeness of the pages which have a custom URL path.

Do you have any idea?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:32:08+00:00Added an answer on May 27, 2026 at 5:32 am

    You can use the drupal global $base_url to get the absolute path of the installation and append the absolute path of your image to it.

    See the Drupal Documentation to this topic.

    You can also use base_path() to get the path.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to display two lots of text in two different footers in my
I want to display the values of two different tables, and two different columns
I want to display a line of text with two different colors (black and
I want to display two different XSLT transformations in function of what the user
How can I use JavaScript to display one of two different layouts based on
listview want to merge two different arraylist into one adapter. i try using the
I want to display data in two columns as below Entry 1 Entry 2
Hi i want to display join result of two tables but don't want to
I have two possible widths for a string i want to display in a
If i have two tables Books, CDs with corresponding models. I want to display

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.