Tagged Questions

Theming is about the development, adaption and configuration of "themes". A "theme" in Drupal is a set of files containing PHP, templates, Javascript and CSS that in concert provides a certain appearance of a site, and that clearly separates layout and styling of a Drupal site from content and ...

learn more… | top users | synonyms (2)

0
votes
0answers
28 views

Get term ID of a field vocabulary in for templating

I have a node template with various taxonomy fields and I'm trying to get the term ID of a specific vocabulary field to pass it through an url. I have tried many function but I can't seem to find the ...
0
votes
0answers
6 views

Is it possible to display create basic page template on my custom page

Is it possible to display my "create basic page" template in my custom page through code.If it possible can anyone please help me. My main aim is to login as admin user i'm redirecting my custom page ...
0
votes
0answers
10 views

Help text blocks show up randomly in node add/edit form with Drupal Bootstrap theme

I come to you this morning because I can't get rid of this display bug. I set a Help text for all my content-type's fields to guide my users in the node add/edit forms. However, these text blocks ...
1
vote
1answer
24 views

How to show all template suggestions for a page without using Devel Themer?

For some reason the Theme developer module doesn't work on my site (whenever i activate it and navigate on my site it just shows a white page with written "Jump to main content"), but all I want to ...
0
votes
2answers
20 views

Is there a tpl.php file generated by Drupal 7 for custom content types

I seem to remember it being mentioned somewhere in the past that when you create a new content type in Drupal 7 that there is a corresponding node--[content-type].tpl.php file created somewhere by ...
0
votes
1answer
40 views

Display node in multiple context

I'm using Drupal 7, and this problem have been tormenting me these past few days : let's say I'm using the basic content type Article, with basic view mode : full and teaser. Now I'm creating a ...
0
votes
1answer
29 views

Access denied error after login

When i log in to drupal doesn't matter with any account either admin or normal user. I get error Access Denied. I then again try to login and it works fine. What is that problem? My theme was shipped ...
0
votes
1answer
14 views

Add markup before form output for user-login

I've created a template override for the user login form (user-login.tpl.php) and want to put some content before the form's elements (e.g, header text and copy). Anything you add in ...
0
votes
2answers
22 views

Show total count of items on page created by views

What is it right way to show total count on views? I found this print count($view->results);
0
votes
1answer
17 views

print title and contents on a custom tpl.php template?

im making a custom theme for drupal, and im having a hard time trying to understand how to adapt one of my themes to drupal 7. Right now im having an issue because i need to set some classes on all ...
0
votes
1answer
12 views

Template files and Machine Names

I am trying to create some variables in my template.php file using the form machine names from a content type I created. Then I am creating a node.tpl.php template file that is related to the content ...
4
votes
3answers
305 views

Risks of developping your own theme from scratch?

I read several answers about "Is it better to develop your own theme from scratch or extend a existing one?". Here is my situation: I just got an existing project and I have to debug it and evolve ...
0
votes
1answer
15 views

Print full node url escaping special characters?

How can I print the full node url in a tpl file escaping special characters? So im using this: <?php print $base_url . $node_url ?> Which gives me a url like ...
2
votes
1answer
22 views

Commerce: save quantity button removing products

I've come across a frustrating issue after adding a cart view block on my page in the form of a "sidebar". When trying to update a quantity or just clicking the "save" button (at bottom of the view) ...
0
votes
1answer
22 views

what does $styles means in drupal?

I am new in drupal.. please let me know what is the meaning of $styles in drupal html.tpl.php file.. If we want to add new css and js from where we can add this.. PLeas help me..
0
votes
3answers
30 views

How to create a theme function for custom HTML markup and then call it in my node template?

Ive created an asses for my site in the content type tpl file. Its mainly HTML but also some simple PHP. What are the steps to move this to a theme function?
-2
votes
1answer
20 views

Travel listings module for Drupal

I'm using Drupal 7 and can't find a suitable module to add travel listings content type. It would be great if that module would just work by having specific fields, like location and address, as well ...
-2
votes
1answer
26 views

Block print on page.tpl file

I have created a block for adding image from drupal backend with title name "image". Now i want to add this block into page.tpl. How can i do that by using code.
1
vote
1answer
53 views

is it possible to add a class to header found in page.tpl based on a node id?

first off, i’m using Adaptive Theme so maybe this won’t make sense using a different theme. but here i want to add a class to <header id=“main-content-header” class="someclasses"> which is ...
0
votes
1answer
9 views

Theming property non-object when transversing the $node object

I'm getting this error when I run the code below, in reference to $color module: Notice: Trying to get property of non-object in cotyhouse_preprocess_html() function ...
0
votes
1answer
31 views

Print node body removing html entities?

Im printing the node body in my tpl file with this: <?php print render(field_view_field("node", $node, "body", array( "label"=>"hidden", "type" => "text_summary_or_trimmed", ...
4
votes
1answer
140 views

Trying to add an html head tag in Drupal 8, beta 2

With Drupal 8.0 beta2, drupal_add_html_head() has been deprecated in favor of #attached. So the old way was: function MYTHEME_page_build(&$page) { $viewport = array( '#type' => ...
-1
votes
1answer
31 views

What is wrong with this drupal 7 preprocess function to output a fields value into the body classes?

I have the following preprocess function and was wondering what I have wrong here as its not working. This is just to grab a fields value and insert it into the body classes. /** * Implements ...
0
votes
0answers
6 views

Set the back-office theme to a specific url

(On drupal 6) On some of the websites i have to manage, the translation page of a node ( mywebsiteurl.com/node/NodeNid/translate) use the main theme instead of the back office theme. I have some ...
1
vote
2answers
39 views

How to add css class to these form fields?

I wan to be able to add certain css class to all the text fields in my content edit forms. here is a picture of what i can see using Devel: Those arrays under the "Und" are for the fields I want to ...
0
votes
1answer
22 views

themeing os user edit profile page

I am doing theming of user edit profile page Now i have three fields here Password, currentpassword, confirm password What are their field items i have tried <?php print ...
3
votes
1answer
47 views

Why the main theme isn't applied in the preview?

When I’m in administration mode, using the 'seven' theme, and I click on Preview, instead of using the main theme, the preview uses seven's stylesheets, which is silly-willy because it’s not what I ...
0
votes
1answer
17 views

Wide blog theme for drupal

I've been searching internet for paid or free drupal themes that is best for blogs and does have wide space for html context, not center of screen with a very tight space. Tight space example: ...
0
votes
1answer
20 views

Creating Preprocess function to add extra classes dependent on field value

I have a content type called "article" and I have a field called "text color" and I want to add this text color field's value as a class to either the body or content container and change the text ...
0
votes
1answer
12 views

Change View Mode on Taxonomy Tag Pages

I have a field that is linked to a taxonomy vocab called tags when creating my "Article" content. When I show these tags on the node page, it links to: /tags/ I can't seem to find where I can change ...
0
votes
0answers
11 views

Profile2 integration with Private Message

I've created profile pages using Profile2 module and would like people to be able to send users a message from those pages. Unfortunately I can't seem to get the 'Send user a message' link on the ...
-1
votes
1answer
20 views

Easiest way to add color to a title field? [closed]

I have 2 fields, one is an image and the other is just a title. Now the title hovers above the image, but the problem here is that the image might clash with the font color. If the image is ...
0
votes
0answers
16 views

Solr related content and autocomplete not showing in bootstrap template

I'm making a bootstrap based theme on my site and all of a sudden the related content block from the Apache Solr is not showing anymore. I haven't changed anything yet on my drupal theme still i can't ...
0
votes
1answer
38 views

How to apply a function to the title of a teaser made with display suite?

I'm pretty new to functions and PHP (so please forgive my terminology) but here's what I would like to do: Background My homepage contains a view displaying various content type teasers. I would ...
1
vote
1answer
20 views

How do I get rid of <p> tag in manually created block?

I'm trying to remove a <p> tag from a manually created block. This block only contains an image and nothing else. I have kpr() function outputting block variables but am not seeing where, or how ...
0
votes
4answers
34 views

How to show the contents of view page from template?

I'm trying to theme a view page on Drupal 7, I used views-view--name-of-page.tpl.php So now it's blank right? I invoked some blocks on the view page and added some divs to style but I can't seem to ...
0
votes
3answers
46 views

Drupal user registration form

I just want to do somthing without using module like profile2, so here is my requierment. => theme user registration form for e.g. i already have a beautiful user registration form as static html ...
0
votes
0answers
21 views

Let users upload images from social networks

I'm trying to build a website that gives user's a profile page where they can either upload images from their computer or pull them in from Facebook and Instagram. Ideally i'd like the user to have ...
0
votes
0answers
18 views

Adding a custom logo to the title in a Drupal 7 RSS feed

I'd like to add a custom logo after the title in my rss feed. Normally if there were an rss.xml I would add the after the tag, but in the admin panel for rss there doesn't seen to be a way to add a ...
0
votes
1answer
20 views

How to add and render a region in omega 3.x subtheme?

Can anyone let me know as how to render a region in omega 3.x subtheme ? I have tried creating a region using this command in .info file as regions[region name] = region name and used render command ...
0
votes
1answer
26 views

Error Message are not coming

I have create a template for user-register page I have created a module under hook_form_alter as if($form_id == 'user_register_form') { $form['account']['pass']['#type'] = 'password'; ...
0
votes
0answers
35 views

Customize “My account” and “Logout” Links in my subtheme with CSS button problem

So I'm trying to shape "My Account" and "logout" links in to my omega 3 subtheme with this css: { -webkit-appearance: none; -moz-border-radius: 11px; -webkit-border-radius: 11px; ...
0
votes
0answers
11 views

Toggle theme region visibility in zen

I'm building a site with a fixed navigation bar at the top. I want to have a icon in the right side of the nav bar that toggles the visibility of the second sidebar (containing the user menu and a ...
0
votes
1answer
14 views

Receive error when printing field

Hi i've just started building a site on Drupal 7.31 and i'm following my normal procedure i've used loads of times. One of the things I have on most sites is an introduction just beneath the title. I ...
0
votes
2answers
27 views

Drupal - user registration form- theming

I need to do theming of user registration form I m doing in this way Module file function mymodule_form_user_register_form_alter(&$form, &$form_state, $form_id) { ...
0
votes
2answers
39 views

Outputting multiple content fields all wrapped in a div [duplicate]

I'm trying to wrap multiple field items in an HTML container. So let's say I have "Blog" content type. I have field1, field2, field3, field4 and field5 for this content type. I want to output ...
0
votes
0answers
13 views

custom menu links

I have a modal that I need to attach to a menu link in D7. I tried to go put the name of the modal into the menu path #myModal4 but it tells me The path '#myModal4' is either invalid or you do not ...
-3
votes
1answer
42 views

how can I resize user's picture with css [closed]

Can someone please help with the above question, I want to display [current:user-picture] using token, which has a initial size of 100x100 and resize it to 20x20 with css. But its not working. I'D ...
0
votes
1answer
14 views

Flexslider - on touch

I am using Flexslider module in drupal 7 . when i checked my website on mobile. i am not use slider by touch Is there is any setting for flexslider. Thanks
0
votes
0answers
15 views

Hide Page Title on Views 3 on Drupal 7?

There doesnt seem to be a concise answer of how to hide the page view title on a rendered views page. Does anyone know how to hide this without having to install another module or write any code? is ...