This forum is for assistance with theme development.

Help with Preprocess: function blinks_responsive_preprocess_field(&$variables)

Here is my code.

function blinks_responsive_preprocess_field(&$variables)
{
	if($variables['element']['#field_name'] == 'field_subroutines') 
	{
		foreach($variables['items'] as $sub => $subroutine)
		{
			$subroutine['#markup'] = "<img src='some_url' />" . $subroutine['#markup'];
		}
	}
}

Subroutine is a field of the content type 'netrunner-card' and you can have from 0-infinity per each card.
I want to put an image in front of each entry of Subroutine.

Loading images via jQuery path is wrong

So I have a weird issue, I am trying to dynamically load images in my theme folder via jquery's css function

$div.css({'background': 'url(' + path + path_to_image + ')'});

where path is the path to my theme and path_to_image is the path to the image within a folder in the theme folder. Anyway it works on some pages, but doesn't work on others.

How to display search box in page--front.tpl

Hi All,
Actually i have created a front page page--front.tpl and when i tried to display search box in front page it is not showing and i used the code which i got like below in template.php

Open Deals Distribution - Replace Buy Now with Visit Site

Greetings All,

I am new drupal and i was looking at the opendeals distribution which has been built with perfection for startups.

I need a small tweaking in the functioning of this Distribution.

1. When we post a deal , I would like to post the deal with a Site URL.

2. When a user visits a deal it should should "Visit Site" instead of buy now. Visit Sitre should redirect the user to the site url posted in the backend.

Please help me with this modifications

Thanks in Advance

Make a copy of existing theme?

Hello.

Is how can i make a copy of an existing theme, with another name.
I tried to change the name in the .info file, but there remains only one theme.

The theme is Storefont.

Why i need 2 themes, is because i want it to change to the new theme when a mobile device is detected..

Thanks..

Template File not working.

Hey There,

So my mission is to learn Drupal so what I have done is I have taken my most complicated HTML & CSS files and want to integrate into Drupal, I need to get a Custom Login Page due to how the Home Page page.tpl.php file is Designed:

Template.php File:

<?php
function Bunurong() {
  $items = array();
  // create custom user-login.tpl.php
  $items['user_login'] = array(
  'render element' => 'form',
  'path' => drupal_get_path('theme', 'Bunurong') . '/templates',
  'template' => 'user-login',
  'preprocess functions' => array(
  'Bunurong_preprocess_user_login'
  ),
 );
return $items;
}
?>

user-login.tpl.php

 //print the variables if needed to allow for individual field theming or breaking them up.
/*print '<pre>';
print_r($variables);
print '</pre>';*/

Pages

Subscribe with RSS Subscribe to RSS - Theme development