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
1answer
18 views

Page content not showing [on hold]

It all worked fine until my client noticed none of the pages are showing content. The theme is made by me, but when I change it to a default theme such as Bartik, then everything works fine. I think ...
0
votes
1answer
23 views

Content type node not overwriting the default node.tpl.php even if I have cleared all cache's

I have a content type with a machine name of 'empresas' after reading the documentation I should be able to just create a node--empresas.tpl.php to toy with the output of this in my theme. it seems ...
0
votes
2answers
21 views

Taxonomy terms manipulation on node.tpl.php

I wanted to print taxonomy terms on my custom node-mytype.tpl.php but what I want is not to print all the terms as they are. Each of these terms consists of 2-3 words. And I want to manipulate the ...
0
votes
0answers
8 views

theming ubercart checkout fields

I would like to add some extra html/text to one of delivery address fields - phone number. Wha twould be the best way of doing that? Would this code be of a ...
0
votes
1answer
16 views

preserve format of node body

for output display I used http://foundation.zurb.com/docs/components/accordion.html I have the following code: <section id="main-content"> <dl class="row accordion" data-accordion> ...
-1
votes
0answers
20 views

Where can I find the content of my exported website? [on hold]

I have all the Drupal-files of my old website stored on my computer. This website is currently offline. I would like to find the written content of this website, so eg. all the team members' ...
0
votes
1answer
24 views

Template.php - Hiding Specific Element on Node Edit

Drupal 7 Say I have a custom element being rendered out on my page.tpl.php (say it's named $custom_element in the below example), but this is also showing up on the Node Edit page because I want this ...
1
vote
1answer
28 views

Test if template files (.tpl.php) are used by theme

I've inherited a custom Drupal 7 theme with many template files. I'm sure lots of them aren't actually used by the website, and were part of the testing process. Is there a method to list which ...
1
vote
2answers
68 views

Getting the image URL from a field_image on a node

So I have this Node: object(Drupal\node\Entity\Node)[1862] protected 'values' => array (size=17) 'vid' => array (size=1) 'x-default' => string '7' (length=1) ...
0
votes
1answer
13 views

user-profile-edit.tpl.php not working for user#1

I am going crazy on this one :-/ I have overridden my user edit page with a user-profile-edit.tpl.php In my template I have: function mytheme_theme() { $items = array(); ...
0
votes
2answers
25 views

Combining fields in preprocess template

I want to combine two fields (say first name and last name) of a particular type of node so that the name displays correctly and I still have the individual fields to work with in different areas. I ...
0
votes
0answers
27 views

Is there a way to retrieve DRUPAL TWIG template's with core drupal 8 javascript functions like twig.js?

Is there a way to get precompiled twig templates from drupal 8 ? Example : Drupal.getTemplate('my-template.twig')(data); Thanks.
-3
votes
1answer
24 views

Best way to approach HTML5 in Drupal 7 [closed]

I am using HTML5 boilerplates for my own theme and special HTML5 tags in my markup. What would be the best way to get a clean HTML5 markup in Drupal 7. My html.tpl.php looks like this currently. ...
0
votes
2answers
29 views

Drupal aligning blocks and content next to each other

i have a view page and two blocks which i want to display next to each other. I want view content on left and two blocks on right, with one block on top and other just below it. But i am having ...
0
votes
0answers
16 views

Respond.js not working in IE8 with Zen 7.x-5.x

I have a responsive Drupal 7 site using a custom subtheme of Zen 7.x-5.5. However, in IE8, media queries are not recognized so the design is rendering in a single column as if it were a mobile phone. ...
0
votes
1answer
16 views

Cannot load array items in Views template

I am currently struggling to alter the output of a field inside a specific view template. I have a Taxonomy term I want to render using a <h3> over the default <div> that Views default ...
0
votes
1answer
27 views

Theme based altering of default image-style for the same node-type and view-mode

OK, After some research and since Domain_views module seems to be a little bit buggy (printing always default Domain ID no matter what), I think this is the base question solving my problem the other ...
0
votes
1answer
24 views

Display user picture below content type article

How can i display user name and picture below node article. My theme is based on panels so i dont know where to write code for it. Or any admin option. Thanks
0
votes
1answer
20 views

How do you integrate a search feature into an existing design template [closed]

I currently have a full Drupal website built on the basis of a purchased HTML template. I built the drupal-theming with several tpl ... You can see the website here ... www.woodtex.be I thought i ...
0
votes
0answers
21 views

Which is the better way to way to theme fields in Drupal 7 [closed]

Which is effecient way ot theme fields in drupal. Using theme_field or field.tpl.php? Which is easier and effecient to use
0
votes
1answer
15 views

Drupal 7 customize profile2 module profile edit form using template method

How to customize profile edit form of profile2 module using the template method ? Profile2 has main profile, and set to provide a separate page for editing profiles. ...
-1
votes
1answer
33 views

How to create dynamic multi column forms using native form module?

I am looking to find out how I can create a form which the definition of the form is coming from a REST API as a JSON object. The form can be 1 column, 2 columns or 10 columns. I have been able to do ...
-2
votes
0answers
15 views

Use SB Admin template for Drupal 7 [closed]

I do believe you all have known the popular admin SB Admin template http://startbootstrap.com/template-overviews/sb-admin/ . How to port SB Admin template into Drupal theme. I want to use this theme ...
-1
votes
3answers
32 views

Change from email id when admin approved user account

I want to change FROM Email id, when admin approved an user account. Currently it is using admin email id. I want to use different email and my admin email id will remain same Any Suggestions
0
votes
0answers
19 views

How to add byline into node view pane?

Usually on node page we can see byline (Submitted by admin on date), but how to add that kind of info to the Panels pane? It seems there is no single theme_node_submitted() anymore in Drupal 7 ...
0
votes
2answers
33 views

call js in html.tpl.php [closed]

I want to add smoothstate script to my pages. I have to call 2 files at the bottom just before closing body-tag. Smoothstate.js and Functions.js. How can I call those 2 js in my html.tpl.php ...
1
vote
3answers
46 views

Change Text of Create an Account in Login Block

I want to change text of Create an account to <div>something></div><span><a href="actual_link">Click here</a></span/> When I print the form I got these ...
0
votes
2answers
29 views

Override default table template In custom module

How can I use a custom module to override views-view-table.tpl.php? I understand how to do it for a theme, but I want to provide the template using a custom module. I've already created my replacement ...
0
votes
2answers
121 views

Override field template (twig)

I try to override a fields template with my own one. The field is called field_test so I created a twig file with the name field--field-test--mynodetype.html.twig in root-theme-directory/templates/. ...
1
vote
1answer
32 views

Custom PHP vs Drupal Workflow for a Web Application not Websites

This question can be too ambiguous but i think many new drupal users face this difficulty like me. There are many blogs which says that Drupal is a CMF and we can use it for making Web Application ...
0
votes
0answers
22 views

How to theme a webform page in Drupal 7?

I know I can theme the form: webform-form-3.tpl.php But how do I theme the page.tpl.php or even html.tpl.php only for webforms?
0
votes
1answer
39 views

Create a landing page as the front

I have created a content type called 'landing', however when I try and setup this as my homepage config/system/site-information to the alias 'landing' It takes on the node--front.tpl.php as the ...
0
votes
1answer
22 views

fatal error: Argument 1 passed to drupal_attributes() must be of the type array, string given, called in theme.inc on line 1714

i am registering themes using hook_theme in mymodule, following is code of my hook function mymodule_theme() { return array( 'updates' => array( 'template' => ...
0
votes
2answers
41 views

Database query in template.php

Is it ok to query the database in a template.php file of a sub-theme. If not where do I put it? Below I have function that is querying the database and it works fine but I want to make sure I doing it ...
0
votes
1answer
19 views

How can I get path aliases arguments from a URL in a template?

I have a content type which has an automatic path alias to latest-news/[title] (e.g. latest-news/example-news-title). I need to get the first part of the path alias in my page.tpl.php file, but when ...
0
votes
1answer
18 views

Fatal error after subtheming Commerce Kickstart Admin Theme

I am trying to subtheme Commerce Kickstart Admin Theme. I have copied all the folders and files to sites/all/themes/my__admin_subtheme, and changed the appropriate lines in my_admin_subtheme.info. ...
2
votes
2answers
17 views

Theming of User page

I want to do theming of default user login page. Can we create a page similar like page--node--33.tpl.php.
-1
votes
0answers
21 views

Front Page Block Classes - How to Semantically name with context: BEM or SMACSS?

I've been agonising over how to name front-page block classes. Like many, every site I build (and they're 95% Omega 4) has a bunch of widgety blocks mostly containing teasers in the main content area ...
0
votes
1answer
28 views

How to add outer div to Profile2 profile including link set in #prefix

I would like to add a wrapper div around Profile2 profiles when displayed on the user account page. I can wrap the title and profile fields by modifying user-profile-category.tpl.php in my theme. ...
1
vote
1answer
40 views

Drupal 8 set homepage template

How do I change the Drupal 8 home-page template, so it uses a different template from the regular page.html.twig template?
0
votes
1answer
39 views

Changing user picture HTML output on user profile

How do I customise the HTML output for the user picture on a user profile? I can output it in user-profile.tpl.php with <?php print $user_profile['user_picture']['#markup'];?>. However this ...
4
votes
2answers
170 views

Why doesn't drupal_render work, but render does?

I've a piece of code what is rendering a custom table (see var_dump below) what is shown on for specific states of the node. The data of the table is for both states the same. array(1) { [0]=> ...
0
votes
0answers
21 views

AddToAny share buttons doesn't show up in search page

I've installed AddToAny module and I configured it in such a way that the share buttons show up on all pages of my site. It works well and the share buttons appear on all the pages except the default ...
0
votes
1answer
25 views

Drupal Doesnt Load after Installing Theme [duplicate]

I had installed Omega Theme in drupal. I enable and set it as a default theme.I also disable it's former default theme "Bartik". Now I didnt see changes taking place in my Drupal site. Because of ...
0
votes
2answers
37 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
1answer
42 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
31 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
27 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
46 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
49 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 ...