Questions tagged [theming]

Use it for questions about rendering or modifying the HTML markup produced by a module/theme.

Filter by
Sorted by
Tagged with
6
votes
1answer
214 views

Synchronize two drag-able tables

I have two tables on a page that the row positions need synchronized when a row is drug. One table is the master table and is the only place that the actual dragging can take place. Basically, what ...
1
vote
0answers
305 views

Group multiple times by day (multi-value date field)

So I have a date field that allows multiple values. In this particular case, I have something like: [0] = Monday, 4pm [1] = Monday, 6pm [2] = Tuesday, 10am [3] = Wednesday, 11am [4] = Wednesday, 3pm ...
1
vote
2answers
646 views

Activate an existing menu item through code

I need to activate an existing menu item through a hook when I'm on a certain page. To give some context, I have a primary navigation bar which is visible on all pages, and when I'm on a user profile ...
0
votes
1answer
722 views

How to change the logo image dynamically when user change language?

How to change the logo image dinamycally when user change language by clicking in the flag? Exist an easy way to resolve this problems?
0
votes
1answer
4k views

Adding a background image to the header

I'm trying to display a photo as background image for a Drupal 7.7 website. After reading a doc on subthemes, I have created a directory called "pasture" in the same directory where "bartik" resides (...
5
votes
1answer
1k views

How can I customize the first sidebar?

I am trying to customize the Bartik theme. How can I customize left sidebar? I want to add some more links, and remove the search fields.
1
vote
1answer
2k views

Get just the first item from a multiple valued field using field_view_field()

I'm using field_view_field() to get the render array for a image field that has multiple values. I then use drupal_render() on that resulting array to print out the markup. I only want the first ...
1
vote
2answers
340 views

Set different page and window titles

What I'm trying to do seems simple, and I'm sure it is, I just don't know what theme files need to be modified and how to modify them. I want to make the user profile page display the user's first ...
1
vote
1answer
219 views

Themes folder path changes

I am developing a site, in which my client has only access to sites/default/files path(their company allows only this path as public) today i got a new requirement that theme files such as css and js ...
2
votes
1answer
5k views

Using preprocess node variable in page.tpl.php

I've set up a couple of variables in my template_preprocess_node(). How can I access them within a page template? I can access the $node variable, but it doesn't seem to have been preprocessed. How ...
4
votes
1answer
1k views

How to build a newsletter template

I'm creating a content type specifically for email newsletters, which will be sent using phplist (client prefers phplist to using a Drupal newsletter module such as Simplenews). So I'm planning to ...
1
vote
2answers
3k views

Custom links to switch language in Drupal 6

In my case, I wanted to print the language switch links directly in page.tpl.php, for example with: <a href="what_to_put_here">English</a> <a href="what_to_put_here">Deutsch</a&...
3
votes
2answers
74 views

is there a way to make template for set of nodes?

Is it possible to make a template for set of nodes in Drupal 7 for example page--node--[601-602-603-604].tpl and if so what is it?
0
votes
1answer
857 views

Drupal 7 Artisteer generated theme fatal error with media gallery

Before I start, I know that some of you may have your opinions on Artisteer, and I respect that it may not be the best way to create a theme, especially for Drupal 7, but to be truthful, I have no ...
0
votes
1answer
589 views

Tao overriding parent reset.css file.

I wish to override one of the default css files provided from the theme I am inheriting from. According to Creating a sub-theme page I need to do the following: Overriding inherited style sheets: ...
0
votes
1answer
422 views

Remove all added classes to body tag

How do I remove all the classes that are being added to the body tag? Currently my body tag is : <body> This however is rendered as <body class="lightbox-processed admin-nw admin-vertical ...
2
votes
2answers
945 views

Can I use 'drupal_add_library' inside an ajax call?

The title is pretty self-explanatory, I would like to do something like this to display a jQuery UI dialog: function my_ajax_page_callback() { drupal_add_library('system', 'ui.dialog'); ...
0
votes
1answer
167 views

A custom template file is not properly rendered

I know this issue is covered quite well, but at the moment I'm really perplexed on this. First, I'm using the Zen theme. In my template folder I've created page-music.tpl.php, page-gallery.tpl....
7
votes
1answer
766 views

When can uid 1 get an access denied page?

I am having a very strange problem that I can't track down. We have been working on a custom site for a client now for several months. Theme is a Zen subtheme. I can't remember the last time I ...
11
votes
2answers
29k views

How to theme a menu block?

I have created a custom menu (lets call it "mynav") and in my theme I've created a template specifically for it (block--menu--menu-mynav.tpl.php) which contains: <div id="mynav" class="<?php ...
2
votes
1answer
533 views

How to adjust the display order

The HTML structure is the following one: <div id="contentp"> <p>.........</p> <p>.........</p> <div id="rate-node-18-1-1" class="rate-widget rate-...
0
votes
1answer
2k views

Can I use the $language variable in a Drupal 6 template file?

Is it correct to use the $language variable to make conditions in the page-front.tpl.php? Is if ($language == 'es') correct?
2
votes
1answer
933 views

Rewriting taxonomy term in exposed filter

I have an exposed taxonomy term filter with values of "true" and "false". I would like to simply rename the options to "yes" and "no". I can't simply change the taxonomy tern name since I am ...
5
votes
1answer
331 views

Extract the CSS class depending on the user type

Is it possible to extract the PHP string for user type, when the user is not an administrator user? I need to discern between staff or non-staff users. I am aware of $is_admin, but in this case I ...
1
vote
2answers
983 views

How can i modify the height of input textfield in login form in drupal 7?

how can i costumize a form ( for example login form ) in /user and specifically the height of input textfield? And the button "login"? I try with the function theme_form_element() but nothing good!
0
votes
2answers
123 views

Register Page Themeing

I just found out the template for themeing the register page is page-user-register.tpl.php. But, how do I change the labels on the textfields etc? For instance, I want to rename the E-Mail label to ...
1
vote
1answer
459 views

Change Template for a Content

I'm using Drupal (version 7) for the first time and I have two content types, Landing Page and Article Page, each with their own templates page--landing_page.tpl.php and article_page.tpl.php ...
0
votes
1answer
208 views

What css framework is better between 960gs and Blueprint?

For a new project what is better for drupal between Blueprint and 960gs? I usually prefer 960gs, but for you?
2
votes
1answer
743 views

Smart paging rendering pager different from the Devel model

I am on Drupal 7 and I have the Smart Paging module enabled. When theming my module, I want the page numbers to appear as regular links. This seems to be the natural behavior. Here is the HTML ...
6
votes
1answer
3k views

Override theme_node_preview

I'm using a custom theme but Seven as administration theme. How can I override the theme function 'theme_node_preview'? Notice that theme_node_preview is called in the node form, and it's shown in ...
2
votes
1answer
223 views

Limiting table rows viewed in CCK Table Field

I'm using Drupal 6. The node has been created with 10 rows. I'm looking for ways to make the table content viewed on the front page with 5 rows, where it has "more" link to the full node. It can be ...
3
votes
3answers
312 views

What's the best way to maintain templates for standard pages and a front page?

I’m developing a new Drupal 6 theme with a custom front page. My standard page.tpl.php has the entire HTML structure (as it should), including the doctype, HTML head, and HTML body. When I make page-...
3
votes
3answers
672 views

Changing size of user avatar in template file

In node.tpl I currently display a users avatar' using this code theme('user_picture', $account) My avatars are currently set to 85x85px but when they are displayed in nodes I want them to be smaller....
5
votes
1answer
660 views

Add lightbox to product list in Ubercart

I'm trying to enable lightbox2 for product listings in Ubercart for Drupal 6. This is simple via views, but I think the product list is being generated by uc_catalog module. How can I add classes to ...
3
votes
1answer
2k views

Drupal 7 - access to page content in template.php

In Drupal 7 I'm trying to access the body field of a page from template.php. I want to find a keyword in the text and then send subsequent text to a separate variable so that I can format it in page....
7
votes
2answers
3k views

Inserting search terms into a search input in Drupal 7

When using Drupal 7, how do I print the current search terms into a search form in a block? In Drupal 6, I used something like this in my template.php: $vars['search_keys'] = search_get_keys(); ...
1
vote
1answer
537 views

how do I get Rounded Corners to work on a ddblock in drupal 7?

I am trying to make the borders of a dd-block that I am using round. They are round in Firefox 5.0, but anything earlier than that, or in any other browser, it doesn't work. I have the CurvyCorners ...
3
votes
1answer
4k views

Theme the View/Edit Tabs

I would like to be able to theme the view/edit tabs. That is, I'd like to add a class to the <li>. Any help with this would be much appreciated. Cheers in advance.
4
votes
1answer
1k views

How to dynamically change the CSS style of a node-type?

I want to modify dynamically the style of a page in base of your content type: I tried with a preprocess function insert this code: if(isset($variables['node'])){ if($variables['node']->type=='...
2
votes
1answer
189 views

An Atomic Question about Views Modules and Templates

I am a Views newbie. I added a template file to my sub-theme folder with a more specific name (from Theme Information), the file name becomes highlighted, but the file is not used (I'm sure of this ...
2
votes
1answer
293 views

Search page summary customization using views

I can figure out how to create a search results page using views in Drupal 7. What I cannot solve is how to format it the same way as a search results page with two lines of summary text and the ...
1
vote
1answer
678 views

Add Additional Logic To Node Save/Submit Process

Where can I hook into drupal to modify the value of a specific field just before it is inserted into the database? For example, lets say I wanted to trigger an email or run an arbitrary piece of code ...
1
vote
1answer
2k views

Drupal 7 Webform settings: how to change the default text in button “next page”?

I have created a webform with drupal 7 with two pages with "pagebreak" field, but when i go in mysite webform and i view the webform at the bottom of the page there is the button "next page": i have ...
6
votes
4answers
1k views

Drupal theme bare minimum

I'm looking for the most absolute basic way to create a custom theme. By this I mean, what are the absolute bare minimum requirements for Drupal to run my theme. So, basically, I guess what files ...
0
votes
2answers
5k views

Easiest way to make body of text wrap around image

I would like to have a body text wrap around the the image below. Here is an example: http://www.fareham.ac.uk/events/2011/06/creative-arts-summer-exhibition And here's an excerpt of the code: <...
6
votes
2answers
5k views

How to prevent displaying the theme on a custom page callback in hook_menu()

I am developing a custom module with a callback script at foo/myurl: function foo_menu() { $items = array(); $items['foo/myurl'] = array( // change 'foo/myurl' to the url you want 'title' =&...
0
votes
1answer
146 views

How do I hide the code of my theme? [closed]

Is it possible to hide the code of the theme that I have created for my client? In other words, when I open the page with firebug I dont want to see the HTML and all the CSS of my theme, also when I ...
2
votes
1answer
2k views

template_preprocess_comment() overrides template.php

I try to override this function in my template.php in Drupal 7; I copied the function found on template_preprocess_comment(). The first line contains function themename_preprocess_comment($variables)....
4
votes
3answers
924 views

How to set page-specific CSS classes on the page callback build array?

I have a page callback like this: function example_page() { $build = array(); $build['#attributes'] = array('class' => array('example-class')); $build[] = array( '#markup' => '<p&...
1
vote
2answers
1k views

Adding a clickable area to the logo

At my Drupal 7.4 website with the default Bartik theme and no contributed modules, I have a big logo (715 x 280 px) and no slogan. These are my settings: I'm trying to figure out the best way to add ...