drupal-theming

Select a template through the admin area?

Up to now, I've always hard coded what page template a certain page should use, either based on the URL, or what type of node it is. What would be really useful is if there was a way to select which tpl file to use, right there in the node edit form. This would allow the user to flick between different page layouts at will. Does anyone...

Best Drupal layout techniques

playing with template files tpl.php Panels Fusion + Skinr Display Suite How do You define the layout of Your Drupal sites? Which techniques do You find most useful? I'm quite old-school and stick to templating. It's true that I haven't practices the others too much. Yet, I'm also afraid that HTML output from Panels, Fusion or other f...

Can't get the search box to show up in custom theme

Hi guys ! I'm trying to make a custom theme for a drupal blog, and I want the search box to appear in the header. To do that, I've put the following code in the page.tpl.php template file :* <?php if ($search_box): ?> <div id="search-box"><?php print $search_box; ?></div> <?php else: ?> <h2>Pas de search box</h2> <?php endif; ?...

Drupal Views - Custom Theme for a field

Two quick questions regarding custom theming of view fields in Drupal 6 - (a) I know that we can include a custom theme for a view field in a appropriately named template file but I notice that it has to be placed in the theme folder. However, I want this theme file to be bundled with my module and was wondering if it could be done so...

Is it possible to add buttons (link) to a view in Drupal?

I am looking to add separate buttons that will be displayed at the top of the view that I am creating in Drupal. So far all the fields that I have added appear inside of the table as they should. The only thing that shows outside of the table is the search filter above (as it should). I would like to add 3 buttons(links) in a row tha...

How to put the pager on top and bottom of a page?

I know that I need to use theme_pager function to render the code: http://api.drupal.org/api/function/theme_pager/6 I know that it is pre rendered into the $content of the page.tpl.php and if I would like to theme it I only had to overwrite the theme_pager function into template.php. I know that in Views I only had to use the variable...

Looking for Drupal webform tutorial

I have setup a Drupal site and will work with a designer to customize some webforms. Is there any tutorial out there which can help a designer (he also knows some PHP but not a programmer background) to get started? I hope he can learn how to: add fields theme the form Thanks~ ...

Theming node's links in Drupal 6

By default, the node links in the blog page contains blog_usernames_blog (admin's blog), comment_add (Add new comment) and node_read_more (Read more). I need to get rid of the first 2 of them, and to change the text in node_read_more. I created a function named $themenamepreprocess_node into template.php in my theme, with this content:...

Drupal Secondary Links Front Page Issue

I'm trying to get my secondary links (which are using primary links as the source, so the children of the primary links) to display as a dropdown on every page. However, since (im guessing) there is no active trail on the front page, the secondary links aren't displayed. How do I set them so that I can display the secondary links on th...

Does Drupal have print button like print link

Drupal has a print link function that I'm using in my .tpl.php <?php print l(t('Announcement'), 'node/30'); ?> l makes it become a link. Does drupal have an equivalent API function to make buttons? If not, what's your best suggestion for this? ...

Drupal: How to wrap inline images into additional markup

Howdy, i need to wrap images into additional markup for further css styling. I would like to have something like that: <p><span><img src="path/to/image" alt="alt"/></span></p>. The images are added directly on the specific node using following modules: http://drupal.org/project/insert http://drupal.org/project/image http://drupal.org...

Drupal: How to get deeplink to comment?

I need to build and print a deeplink to any given comment. So that the user can directly access the specific comment with just clicking a link. I could not find a native drupal function to get this so i build it my own. My solution <?php global $base_url; $base = drupal_lookup_path('alias',"node/".$node->nid); $path = $base...

Drupal: Add id to error list

Is there a solution to add an id to the default drupal error list items? Currently i got this: <div class="messages error" id="inline-messages"> <ul> <li>Name is required.</li> <li>Email is required.</li> <li>Message is required.</li> </ul> </div> But i would like to have the fieldname as id: <div cla...

Drupal: Dynamic View using Arguments

For a current project i need to setup a specific view to display a gallery detailpage. It should work like this: 1. User clicked a node (costum-post-type: gallery) 2. User received an overview page with linked images 3. User clicked an image 4. User received the gallery page (gallerific view) Step 1-3 are done. But how can I get Drupa...

Drupal - Acquia Marina 3 - block title style configure settings

I have made a sub theme to Acquia Marina and would like to change the default setting on the block configuration page from none to Blue rounded title background with white text. Any guidance would be appreciated. ...

HTML Template to Drupal Theme

I have an HTML template. What are the steps to convert it into a Drupal 6 theme? ...

Drupal Views- li tags around every 2 results?

How can I put li tags around every 2 results in drupal views? I have this; result1 result2 result3 result4 And I need this; <li> result1 result2 </li> <li> result3 result4 </li> Thanks ...

Theming node-xxx.tpl.php

hi. i am new to drupal theming. i want to do the following: i have a product content type that i am manipulating it's node-product.tpl.php, the product content-type has a CCK field of type "Embedded Video" (using the Media module found at http://drupal.org/project/media ). since i need to wrap the "Embedded Video" field with a tag i wan...

Drupal 6x - Primary Links jquery accordion menu

Hi, I'm trying to transform my primary link menu block in a jquery accordion menu (link text). I've tested the Accordion Menu module for Drupal, but it does not function for me. For my Primary Links Block I would have more or less this html output: <ul id="accordion"> <li> <a href="#recent" class="he...

Display content in two columns with fixed height in drupal

I'm in need of some pointing in the right direction here... I have a site with a couple of different content types. I want to display this content in a book-like layout. The book should be of a fixed width and height and the pages should be populated with as many nodes as can fit. It should be in two columns, with the left column being ...