This forum is for assistance with theme development.

Theming Seach Box with Forms API?

I am outputting a search form in my theme with print $search_box (using phptemplate) and found that theming it by having the template.php file make a callback no longer works.

I understand the the Forms API is the new way to theme forms. I have even read the Forms API guides.

But, I am just not quite getting it. Where do I stick the code to update the array? in the template.php file?

Can somone, please, give me some example code to update the look of the text field or search button and point out where to put the code.

Help with breadcrumb

I'm creating a new module, for each item menu i need a diferent breadcrumb.

I have:

function mymenu_menu(){
$items[] = array('path' => 'node/'.arg(1).'/details', 'title' => t('Details'),
'type'=>MENU_LOCAL_TASK,'access' => user_access('create example node'),'callback'=>mymodule_details);
$items[] = array('path' => 'node/'.arg(1).'/image', 'title' => t('Image'),
'type'=>MENU_LOCAL_TASK,'access' => user_access('create example node'),'callback'=>mymodule_image);

}

Marvin themes on 4.7

Hi I was wondering though there are many themes for the new 4.7. Is it possible some of the 4.6x themes might go over ok? I know some wont. But I am trying to figure out if I will have to do my marvin black theme all over from scratch or if I can copy over bits of CSS or just use the same theme on 4.7. While Marvin Black is based on camelon I also like Marvin 2k. I noticed one cvs theme(not marvin) said it would work on both versions of drupal. A few if I look in cvs don't say which version they may work with. Though they look like fairly new themes.

How do I create a custom theme or make a not so obviously default theme?

Ok... Theres still a few things I haven't mastered, I'll be honest up front BUT I do have a site installed and running at this place if you care to look. I'm using Pushbutton right now and haven't messed with that ones graphics. Others I have..

I have read Customization and Theming and most of it... kind of doesn't make sense. I'm not a coder by nature so I can't read PHP that well yet. I can read HTML and CSS, thats about it. Also I do know my way around graphics editors so thats no worry.

I've searched the forums on editting themes and haven't found the info I'm looking for but found some cool looking sites(or decent ones anyways) such as;
Terminus1525
Zimmer Twins
Poquer Red
Illect(I think this is Drupal?)
best wireless router
Cialog

I don't want anything advanced like Terminus(although it'd be nice) but I don't want default themes either because they just don't cut it in the real web. Its hard to actually get a project rolling until you get its theme down first...

Improve heavy image themes with apache mod_expires

Hi all,

working on my theme at http://poquer-red.com which is very image intensive I achieved a great improvement in speed using mod_expires to define 1 month expiration time for the images.

Basically this apache mod adds a line containing expires HTTP headers to the objects specified.

Problem with multiple page-whatever.tpl.php files and template.php

Okay. I'm trying to make my site use different page-whatever.tpl.php files depending on which section of the site the user is at. I've seen various examples in the forums and handbooks (separate admin theme, separate front page theme, etc.) but I've yet to see an example of someone trying to use multiple page templates.

Below is the code I'm using in my template.php in order to switch templates (I'm not a coder and my php skills are VERY limited, so bear with me here...the code is cobbled together from several example snippets):

function _phptemplate_variables($hook, $vars = array()) {
  switch ($hook) {
    case 'page':
      global $user;
      if ($vars['is_front']) {
        $vars['template_file'] = 'page-index';
      }
      elseif ((arg(0) == 'admin')) {
        $vars['template_file'] = 'page-admin';
      }
      elseif ((arg(0) == 'group')) {
        $vars['template_file'] = 'page-group';
      }
      elseif ((arg(0) == 'add')) {
        $vars['template_file'] = 'page-addnode';
      }
      break;
  }
  return $vars;
}

The front page renders correctly (using the correct template) but the rest simply default back to page.tpl.php. What am I doing wrong?

FYI, the drupal version is HEAD from a few weeks ago and I'm using clean urls and pathauto and some manual url aliases to deal with urls.

Any help would be greatly appreciated. Thanks in advance.

Pages

Subscribe with RSS Subscribe to RSS - Theme development