IDS = unique
example: #main-header
CLASS= multiple instances
example: .important
IDS = unique
example: #main-header
CLASS= multiple instances
example: .important
Filed under Uncategorized
This is helpful for making custom themes and wanting certain styles or things to load based on the page you are viewing..
<?php if ($_REQUEST[‘q’] ==”our-services”): ?>
Do something if the URL is testimonials..
<?php endif; ?>
Filed under Uncategorized
function YOURTHEME_theme() {
return array(
// The form ID.
'user_profile_form' => array(
// Forms always take the form argument.
'arguments' => array('form' => NULL),
'render element' => 'form',
'template' => 'templates/user-profile-edit',
),
);
}
print render($form['form_id']);
print render($form['form_build_id']);
print render($form['form_token']);
print render ($form[‘field_user_firstname’]);
print render ($form[‘field_user_lastname’]);
print render ($form[‘field_user_dob’]);
<input type=”submit” name=”op” id=”edit-submit” value=”Save” />
I plan on using this to make a multi-page edit form. I will be breaking down the different user fields based on category rather than just dumping everything into one long and boring form.
Filed under Drupal 7, Drupal Theming