0

I am using Impact theme for my site. It either displays text logo(site name, site slogan) or image logo. I want both image logo and text logo for my site.

Any helps are welcomed

0

I assume you have created a sub-theme, in that case, copy the page.tpl.php from the parent Impact Theme to your sub-theme if you haven't already, and delete the else statement (line 73):

<?php if (theme_get_setting('image_logo','impact_theme')): ?>
  <?php if ($logo): ?><div id="site-logo"><a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>">
    <img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" />
  </a></div><?php endif; ?>

<?php else: ?> <!-- delete this line -->

  <hgroup id="site-name-wrap">
    <h1 id="site-name">
      <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>">
        <span><?php print $site_name; ?></span>
      </a>
    </h1>
    <?php if ($site_slogan): ?><h2 id="site-slogan"><?php print $site_slogan; ?></h2><?php endif; ?>
  </hgroup>
<?php endif; ?>

Be aware that the setting for deciding whether to use the logo or the text will no longer work in a either/or scenario, it would force all or nothing. You can get rid of the IF statement entirely, and the setting becomes useless

  • I haven't created child theme – stackoverflowuser Jun 21 '15 at 16:27
  • Well its a good idea to always work from a sub theme but failing that you can make the same changes to the impact themes page.tpl.php – Geoff Jun 21 '15 at 16:39
  • I deleted else statement as per you instruction but now none of the text logo or image logo is displayed. Section above menu are not displaying now – stackoverflowuser Jun 21 '15 at 16:45
  • check the settings for theme - as I said, if you only delete the else statement, it changes it from either/or, to all or nothing, so the setting for logo verses site name is probably still set - as I also said, you can delete the if statement entirely to remove the functionality of that setting – Geoff Jun 21 '15 at 17:18
  • Thanks @Geoff I deleted If statement as well and now it is working fine. – stackoverflowuser Jun 24 '15 at 13:18
0

I would recommend to use the "Panels" module to do that. Create a "mini-panel" and while editing one of it's panes (boxes of content) choose on the edit menu "Page elements" and then add "Logo, "Site name", and "Site slogan" respectively. Make sure you arrange them as your liking.

The second part of your work is to do some CSS for this. The Panels css system takes some time to learn --- You should use DOM tags carefully to isolate the Id's and classes of the right div's and manipulate them in relation to their upper div's, but it's worth the shot.

If your site is responsive you should add some responsiveness with a Media query, i.e:

@media screen and (max-width:519px) {#panel-col-first {width:100%;} #panel-col-last {width: 100%;}}

In Panels, make sure that after you choose basic details and layout you navigate in "content" tab. Then, Add the aforementioned details - Here is a screen that'll show you how:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.