This forum is for assistance with theme development.

How to use Smarty(or other template engine) in Drupal7?

In drupal7, I want to use other template engine to develop theme. How do i can?

Google Store Locator: A Form in content that takes input and push it to the store locator page.

Hi Guys,

I'm very new to Drupal but starting to get the hang of it.

I needed to add a Store Locator to a website that I'm working on and it pointed me towards installing the Google Store Locator module, set it up, got it working and loads in its own page (/store_locator).

Now my question is how do I make a simple form in the content that has a ZIP code, state and miles radius and when submitted, it takes those queries and pushes them to the /store_locator page where the locations and map is located and updates it those information.

[Resolved] How to display CustomContentType form as a page

I created a Custom Content Type to act as a form to allow people to submit information. Some of the things I needed on the form couldn't be done with the Webform module so I created a Custom Content Type. How do I allow this Custom Content Type to be displayed on a page so that Anonymous users can fill out the form and it will create a new URL to their submission for all to see.

Override theme_radios fails with array access

I have a form that I'm trying to style the output of the radio buttons. Currently, I have a form element:

  $form['branding_color_radios'] = array(
    '#type' => 'radios',
    '#states' => array(
        'visible' => array(
            ':input[name="use_theme_defaults"]' => array('checked' => FALSE),
          ),
        ),
    '#title' => t('Color Radios'),
    '#options' => $options,
    '#default_value' => variable_get('branding_color_set', 'ocac_1'),
    '#theme' => 'colorset_radios',
  );

With $options array being:

Array ( [1] => red [2] => blue [3] => green [4] => black )

And that should call the appropriate theme_colorradios and theme_colorradio, however, it fails with this error:

Notice: Undefined index: #options in theme_colorradios().
Warning: array_keys() [function.array-keys]: The first argument should be an array in theme_colorradios().
Notice: Undefined index: in theme_colorradios().
Warning: Invalid argument supplied for foreach() in theme_colorradios().

Here's my hook_theme:

/*
* Implementation of hook_theme().
*/
function mymodule_theme($existing, $type, $theme, $path) {
return array(
// Theme for radio group
'colorradios' => array(
'variables' => array('element' => NULL),
),
// Theme for single radio
'colorradio' => array(

"Delay" CSS files? Switch CSS instructions off?

My company has an ‘institutional site’. All pages are made into recognizable ‘company pages’ by means of a (sort of a) banner shown on top of all pages, with some company-wide links, a search box etc. It is compulsory that these things are shown on all pages. A number of company-wide CSS stylesheets are being used to shape this ‘top part’. This company site has nothing to do with Drupal, and I don't have any control over the company stylesheets.

Within the confines of my company site, I am running a Drupal subsite, with its own stylesheets. These CSS’s cover everything I need.

The problem, however, is that there are a number of ‘inheritances’ from the institutional stylesheets which I don’t want – and which, in fact, cause me major headaches, because a number of collisions occur. This, I think, is due to CSS classes which are used with the same name both in the institutional stylesheets as well as in my subsite stylesheets (e.g. body, #wrapper, #header etc.).

Add CSS class based on url

I have a View page with a url of /gallery, which produces a main menu link called Gallery. This page simply has a few thumbnails, and each thumbnail links to its node (of type Gallery). When a Gallery node is viewed it does not have a menu entry, which is by design. Instead of a menu entry, I have a created a Views block, which displays all titles of the content type (Gallery), and which displays only on the Gallery node type when the url is /gallery/*.

Pages

Subscribe with RSS Subscribe to RSS - Theme development