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
0
votes
1answer
63 views

How to costumize the input fields but only in the page /user?

I want to create a particular style with css for input style in the field of login, register and request new password. The css if i see it width firebug is only one and i must adding a type only for ...
3
votes
2answers
2k views

Where is a resource for theming drupal 7 views?

I needed to theme a view in drupal 7 for example the slider in this site: http://fourkitchens.com/ What file must i create to costumize a view slider and the relative button? In drupal 6 there were ...
3
votes
1answer
3k views

Add field to login block in drupal 7

I am trying to add a custom field to the user login block in drupa 7 for the zen theme. That is, in addition to the username and password fields, I need another field called code. Most of the ...
1
vote
2answers
676 views

drupal_render not working in views-exposed-form.tpl.php?

I put this in the template: <?php print drupal_render($form['title']); ?> <?php print drupal_render_children($form); ?> Neither renders anything. If I dsm($form) the variable looks ...
1
vote
1answer
2k views

Help with adding different stylesheet to one specific page in Drupal 7 using the template.php

I am trying to apply a CSS style (games.css) to page--type--games.tpl.php. I am using Drupal 7, and I have created a new content type called "games." So far, my code works for pulling up the page--...
0
votes
1answer
65 views

mobile site question

here's my plan to build a site w a mobile site: 1) develop all my core modules with robust api's. 2) build a pair of ui modules for each above module. These ui modules are just ui's for the api's ...
0
votes
2answers
356 views

Good looking contributed themes for Drupal 6

I am looking for good looking contributed themes fro Drupal 6. Drupal.org is filled with themes, although several of them lack support even for the most used modules (taxonomy, search, comment) and ...
1
vote
1answer
3k views

Drop-down Menus in Standard Drupal 7.4 Zen theme?

I'm new to Drupal so forgive me if I'm missing something obvious. I'm trying to implement a drop-down menu in Drupal 7.4 in the Zen theme with only a standard install (I'm trying to avoid installing ...
2
votes
1answer
282 views

Complicated views layout

I need to display part of the exposed form in my page's sidebar, and the rest of the form and content in the $content area. There's really no good way that I can find to do this. I sort of got it to ...
0
votes
1answer
116 views

Suggestion tpl help for NiceMenu markup?

I'm using NiceMenus to display my taxonomy tree. Since I chose no parent menu, the module displays the root items as separate hoverable menu "tiles", which is OK. They are however <li> items ...
2
votes
2answers
1k views

Make multiple templates for site (new one for many pages)

So I have my page-front.tpl.php and page.tpl.php. I'm making a music website for a client and literally only need like 5 or 6 pages. How can I basically make a php page from scratch for each page? ...
2
votes
1answer
844 views

How to override “Who's online” block theme without any change to “Who's new” theme

In user module, "Who's online" and "Who's new" blocks both use the user_list theme function. How can I change the markup of Who's online without any effect on Who's new's block markup?
2
votes
1answer
2k views

How to fix display problems with CKEditor?

I have installed CKEditor 3.6.0.6, I have enabled some buttons as in image: CKEditor 3.6.0.6 in full size browser However when I resize the browser smaller than the buttons zones, here is how is ...
1
vote
1answer
4k views

I want to modify the drop down menus for Marinelli (a Drupal theme)

I have the Marinelli menu setup in a website I am internal testing. I want to modify the drop down menu (I know it uses jQuery), but I have no idea what to do to show the drop down all nested. In ...
3
votes
1answer
157 views

How can I commit changes to a theme?

I worked on Omega-7.x-3.0-alpha1 and added some fixes to fluid style sheets in rtl mode. How can I commit them to the drupal.org repository?
2
votes
1answer
611 views

Something I can't understand in Acquia Marina theme

I have downloaded the Acquia Marina theme yesterday. I cannot understand well the following code; there is a lot of code like the following, in page.tpl.php. <?php print theme('grid_block', $...
1
vote
1answer
861 views

Theming user-profile

I am on Drupal 7. Hi, I have installed the Devel module and I am using it to help me theme the user-profile.tpl.php. I want to show the e-mail information only when the user looking into the user info ...
2
votes
1answer
223 views

Several field templates or on node template?

Try to figure out when field templates are the wrong approach... I've been told and agree that you should ultimately avoid creating node templates and try to process things before they hit the ...
2
votes
1answer
128 views

Can I specify the location of a .tpl.php while using preprocess hooks?

If I override the template file using the code below, can I specify the location of page-ajax.tpl.php? I wanted to leave page-ajax.tpl.php inside my module's directory rather than to place it inside ...
1
vote
3answers
3k views

Why does drupal_set_message not appear in the message area?

I often use something like drupal_set_message( krumo( $row ) ); to output debug information. This is suppose to output that message within the $message area placed via the page.tpl file, however ...
1
vote
1answer
164 views

Testing for taxonomy

On my website, I have used the Taxonomy to created different sections. Each section has its own "contact us" page. I want to create a variable that will create a path to the relevant contact page. ...
10
votes
1answer
14k views

Difference between hook_page_alter and preprocess_page?

I don't completely understand when I should use hook_page_alter(&$page) or template_preprocess_page(&$vars, $hook) in Drupal 7. What is the best practices about that to use in template.php? ...
2
votes
2answers
969 views

Initialize & override a Drupal7 jQuery module's (Superfish) provided .js, in code

I'm migrating a Drupal6 site to Drupal7. The v6 site was subthemed in Fusion, and used its bundled Superfish menu js. The init I used that worked was: $(document).ready(function(){ $("ul.sf-menu")....
3
votes
1answer
317 views

Which file do I need to edit to implement a 'Back to top' link?

I am running a Drupal 6.22 site, with a custom template installed in /sites/all/themes/mytheme. Which template file should I edit to implement a back to top link?
1
vote
1answer
227 views

The module is not working as expected

I can't figure out why this module is not working. What is wrong with it? /* hook_menu() */ function profilepage_menu() { $items['p'] = array( 'title' => 'Profile page', 'page callback' =...
0
votes
1answer
279 views

After I overrode a block template for a primary links, block-edit-link doesn't show anymore…?

I just created block-menu-primary-links.tpl.php file in the root of my theme, in order to strip off some default structures I have for other blocks, but now that I did that, block-edit-link which was ...
1
vote
2answers
438 views

How do I output the entire page template?

I've created a custom module that defines a menu callback; that menu path will call a function which performs some actions and once it's finished, it needs to display the theme with a message as the ...
2
votes
1answer
6k views

Render a full entire html page from custom module

I've searched/asked around without success. I'm creating a custom Drupal 7 module, and I would like to render the code in an empty full template (not a page/node.tpl.php); by full template I mean a ...
3
votes
1answer
2k views

How to pass an array or an object from a module to a theme

I have used hook_menu() with a page callback as follows: function profilecb_menu() { $items['profilecb'] = array( 'title' => 'Profile CB', 'page callback' => 'pcb_exe', 'access ...
1
vote
1answer
2k views

How do I return the output from a callback function unthemed?

I have a custom module with a hook_menu() "page callback" function, a custom theme function and a hook_theme() implementation. This module is working fine and the final output of the module is passed ...
0
votes
1answer
3k views

How to use theme_hook_suggestions()

I'm on page of my website and I'm viewing it with the theme developer module, which gives me a lot of information. It gives me some theme suggestions based on theme_hook_suggestions() which are: ...
0
votes
1answer
283 views

How do I connect to the database from a module?

I would like to connect to the database from a Drupal 7 module. Currently I only have the query I want to run which is: $query = db_select('z_lists) ->fields('country') ->condition('value', $...
1
vote
1answer
121 views

How do I hide one block and show another in a template

My page.tpl.php is set to use a particular block in the right-hand column. However, I have one template page (created by a module) in which I don't want to display this block. How can I hide the ...
3
votes
2answers
660 views

Menus - hard coded primary nav with per-page sub nav

My primary navigation is hard coded (it has to be; graphical purposes). Firstly, how can I tell which one is "active" (current page)? Secondly, based upon which one is active, how can I show child ...
4
votes
1answer
1k views

Where do I place custom PHP code (functions, classes) when creating a theme?

WordPress has a place for it - functions.php, which is included automatically. Is there one for Drupal?
2
votes
2answers
3k views

Remove superfluous divs from views fields output?

I've set the Wrapper HTML Element option to none, and removed any wrapper divs in the templates presented in Theme Information, but my image fields are still getting wrapped in plain divs.
4
votes
1answer
2k views

How do I add an additional sidebar to a Zen sub-theme?

I want to add an additional sidebar to my zen based theme with fixed columns. I added it to the theme info, and printed it in the page.tpl.php file, but I don't know how to configure its CSS files to ...
2
votes
1answer
178 views

Search page is not shown properly with D7 custom theme

I am currently building a D7 theme for a website. I experiment some problems with the search page. After entering a search term the page "domain.com/search/node/[searched term]" is opened. But it just ...
4
votes
1answer
257 views

When theming a view there are two approaches, in a template file or rewriting field output, what are the advantages and disadvantages of each?

When configuring a field in a view such as the node title, there are options to add or remove formatting to the view by either excluding the field from view, wrapping the field in a certain type of ...
2
votes
3answers
4k views

How do I display bare, stripped content with no menus, footers, etc?

Here's what I am trying to do: I need to have a way to display only the content in a node without any of the Drupal adornment. All I want is the styles to be inserted, and the content itself. The ...
0
votes
1answer
1k views

Panels vs template performance

Sorry for rather newbie question. I am reading an Panel CookBook and how to create different layouts for homepage and other landpages. Apparently it is possible to achieve the same result with Panels ...
2
votes
2answers
161 views

How do I change the output of theme_comment_submitted()?

How to change the default theme of comment_submitted in drupal? Input: $variables['submitted'] = theme('comment_submitted', $comment); Output My expected result is To print the Name in first ...
2
votes
1answer
323 views

Field template in theme based on Garland

I have problem with template for field "field_is_new" in Drupal 7. My_Theme is a modification of the Garland theme. (I don't know if it's important.) I have created a template for this field in my ...
1
vote
2answers
1k views

Theming user-edit form drupal 6

After installing tons of modules like guestbook, subscriptions etc. It also added tons of settings on user/$uid/edit page. How can I disable or rearrange them? I guess theme_fieldset() would help me, ...
1
vote
1answer
401 views

Adding content to Drupal database

I'm running a rather large Drupal 6 site and I need to include additional information in the database, things that run independently of Drupal. Is it best to create a separate database and connect to ...
1
vote
1answer
264 views

How to distribute a Drupal website on a flash card?

I would like to take a Drupal website and distribute the information on it on a flash card or DVD -- even if it is a read only version. The people who will be using the website will not always have ...
3
votes
2answers
1k views

How to do taxonomy based css styling using template.php?

I'm looking forward to implement taxonomy terms based CSS styling; especially for the body tag which I want to add the current terms. Here is what I have so far: function _phptemplate_variables($...
2
votes
2answers
849 views

Theming html output of privatemsg 6.x-2.x module

How can I theme the output of Privatemsg? I took look at http://api.worldempire.ch/api/privatemsg/privatemsg.theme.inc/group/theming/1, but I didn't understood how to use that. I want to totally ...
1
vote
1answer
379 views

CCK field in node template

If I have a custom CCK field, for example "temperature", is there any way I can directly call it from the node template? Like would there be a $temperature variable? Thanks!
3
votes
2answers
425 views

Is it possible to add custom stylesheets while using a core theme?

I'm trying to add a custom stylesheet although I'm using the Garland theme but so far I wasn't able to do it. I've tried the following: function mymodule_init(){ $path = drupal_get_path('module',...