Hello,

I have 2 questions of things I would like to accomplish with omega theming I cannot seem to accomplish right now:

QUESTION 1:
I'd like to get the logo responsive. I can accomplish this by changing the logo with the media query method but I'd love to have it the
http://adaptive-images.com/ way.

QUESTION 2:
I would like to have an alternative responsive logo and banner for the frontage. Do I have to create a completely new sub theme for the frontage?
I know I can remove blocks with the Delta module, but since you cannot remove the branding block because the logo is in there i'd like to have
a different branding block for just the frontpage so I don't have to create a new sub theme just for the frontpage.

Does anyone of you know what is the best approach to accomplish a different branding for just the homepage without creating a new frontpage sub theme?

Thanks for the help in advance!

Comments

baro’s picture

QUESTION 1:
I think this module might be helpful:
http://drupal.org/project/adaptive_image

QUESTION 2:
Can't you just use block configuration and name the page (your frontpage) where the block should appear. Then create alternative block and disable it on the front page only? This way you should have one block on the front page and the other on all other pages.

Anonymous’s picture

Hi,

thanks for the reply.

Q1:
I got the adaptive image working on all images (image fields) but since the logo is not a field, I cannot seem to make that logo adaptive....

Q2:
If I can make a block from the logo, then it should be no problem to solve this with the Delta module with Context., but, the logo of the theme is not a block if I am correct... I will try to do it via your way...

Thanks for the tips.. If anyone else has tips, they are most welcome!

frazras’s picture

I simply crated a node using the adaptive image module then copied the HTML it used and pasted it in my theme

<img class="adaptive-image" typeof="foaf:Image" src="<URL>/sites/default/files/styles/618x326/adaptive-image/public/field/image/logo.png" alt="">

"I would rule the world - If only I had the source code"
R.A.Smith -- "ƒrÅzRâ§"
http://www.exterbox.com

tmsimont’s picture

see http://drupal.org/node/1518208#comment-6035972

After setting up adaptive image, you can use the code i posted there.

If you use the blockify module, you can place it in the theme hook "theme_blockify_logo"

Note that you'll have to set your image style up first and adjust the file name and image style name in the code posted in the above referenced comment.

christopher james francis rodgers’s picture

Thee 'issues' que for your project:

http://drupal.org/project/issues/omega

If you have a question about or a problem with
a specific module (a 'project'),
or a specific theme (also a 'project'),
the issue que for that project is the closest you can get
to true live help of an unlimited nature
and is in fact the recommended way to get help at drupal.org
for module-specific or theme-specific questions.

  1. Search first. [_Search_]

    The best of all possible searches
    for Drupal Module-specific or Theme-specific
    issues/ questions/ problems/ suggestions/
    or support requests, ...

    Search from any of a project's 'issues' pages,
    (or from the specific project's 'home' page)
    and that will limit your search to all and only
    the issues concerning that specific project.

  2. Then, if you do not find your answer, <_Create_new_Issue_>

    Assuming you did Not find whay you were looking for...

    Click a project issue page's
    link: 'Create new issue'; and for 'Category',
    if in doubt, specify 'Support request'.

===

For more details on getting help on specific projects, see...

"Get the Fastest Answers to Module-Specific
or Theme-Specific Issues at Drupal.org
- How to"
http://drupal.org/node/1478010

===

Additional drupal.org 'general' posting recommendations

Tips for posting to the Drupal forums
http://drupal.org/forum-posting

.
.
.
: o )


All the best; intended.
-Chris (great-grandpa.com)
___
"The number one stated objective for Drupal is improving usability." ~Dries Buytaert *

Anonymous’s picture

Still haven't got satisfying answers..

Anyone can help me on this? Nothing to be found in the Omega docs either!

juzzuu’s picture

Go to the Omega folder in the root folder of your Theme. There you find the template.php file for Omega. And yes, this is a little core hacking!
Look for this block of php code that starts with - * Implements hook_process_region()

look for -

$vars['logo_img'] = $vars['logo'] ? '<img src="' . $vars['logo'] . '" alt="' . check_plain($vars['site_name']) . '" id="logo" />' : '';

add the class

$vars['logo_img'] = $vars['logo'] ? '<img src="' . $vars['logo'] . '" alt="' . check_plain($vars['site_name']) . '" id="logo" class="adaptive-image"/>' : '';

clear the cache and your logo has a 'adaptive class' !

kenheim’s picture

There is a better way to add a class to your logo image. Omega recommends that you put your process function in your subtheme's process folder. There is a readme file in that folder that explains. To accomplish the same result without hacking simply create a new php file called process-region.inc. Then in that file place the following code.

function MY_THEME_NAME_alpha_process_region(&$vars) {
// override the logo variable for the branding region to output a class for the logo image

  $theme = alpha_get_theme();
  
  $vars['logo'] = $theme->page['logo'];
  $vars['logo_img'] = $vars['logo'] ? '<img src="' . $vars['logo'] . '" alt="' . check_plain($vars['site_name']) . '" id="logo" class="adaptive-image"/>' : '';
  $vars['linked_logo_img'] = $vars['logo'] ? l($vars['logo_img'], '<front>', array('attributes' => array('rel' => 'home', 'title' => check_plain($vars['site_name'])), 'html' => TRUE)) : '';
}

Place the file in your subtheme's process folder, clear cache, and you should be good to go. In case you are wondering where the $vars code inside the function comes from, I just copied and pasted it directly from the template.php file in the omega base theme, then I simply added class="adaptive-image" into it.

powerdrupal’s picture

What I did was create a separate front page layout using Context + Delta. Using those 2 modules together seems intimidating at first but after you do it you realize it's actually quite easy to do a lot of things. Creating custom pages is one of them.