Theme templates are part of Drupal's theming system and allow for the customization of Drupal sites.

learn more… | top users | synonyms (3)

0
votes
0answers
5 views

How to create tables for multiple fields in the “node add form” template

How do I create a table for fields in the "node add form" template as image below
0
votes
1answer
13 views

Field collection with condition node tpl

I've been researching this for the last few days and I cant find a clear explanation of this issue im facing. I'm receiving an error when a node has an empty collection with no values. The ...
0
votes
2answers
15 views

Bootstrap theme - add or remove classes in $navbar_classes

I'm using the bootstrap theme, by default in page.tpl.php the nav bar is outputted like so: <header id="navbar" role="banner" class="<?php print $navbar_classes; ?>"> Where can I edit ...
0
votes
2answers
27 views

preprocess_page if front

I have a preprocess_page function that applys classes to my content if there is a sidebar or not. if ($vars['page']['sidebar']) { $vars['content_classes'] = 'cool-class'; } else { ...
0
votes
0answers
13 views

How I create 404 page in theme templates folder? [duplicate]

I was created custom front and custom user page. page--front.tpl.php for custom front page. page--user.tpl.php for custom user page. But, I was not create custom 404 page.It is possible.
2
votes
1answer
30 views

hook_form_alter based on path

I don't know if this is possible but could I do something like <?php $foo = current_path(); print $foo; ?> in page--foo.tpl, then something like function ...
0
votes
0answers
14 views

How to get field from Field Collection in Views template?

I have a field collection - field_video_item. I need to get the image field from this field collection in a Views template. How can I do this?
0
votes
1answer
13 views

drupal 8-b12: how to assign variables from FormatterBase-Interface to _page_attachments hook?

I have created new field-types in drupal. Therefore I have an Instance of FormatterBase, which gets the values from the database and tries to render the values. but i want to pass the variables ...
0
votes
4answers
39 views

How to display the form fields of content type in a table using custom template file?

I have created a content type Article including the fields Field 1, Field 2, Field 3 ...... All these fields have multiple values. I also created the custom template for this content type. Now I ...
0
votes
3answers
26 views

Editing the front page template

I am trying to change the format of the content promoted to the front page. I want to move the display order of the title below the image. By default it's set to title, image and then Read More. ...
0
votes
1answer
17 views

Custom user_register_form for Auto Assign Role registration pages

I'm using a function[a] to get custom templates to work for all pages, including role registration pages set by Auto Assign Role. By setting the role registration path to ...
0
votes
0answers
4 views

Is it possible to use use $page to render profile2 fields for every user?

I need to separate some elements from the main block, so I'd like to take them from profile2--account.tpl and place them in page--profile-account.tpl. I got it to work for one user, but then I ...
0
votes
0answers
12 views

Is it possible to use Devel to create a “mad libs” style profile2 registration page?

I've got the template file working, however <?php dpm($page); ?> and <?php dpm($content); ?> aren't getting me what I need to isolate the forms. I saw this post ...
-2
votes
1answer
40 views

Paid $50 themes for drupal [closed]

I was looking for a designer for our project, but I found some sites which offer paid themes for $30-60. And they are very functional. I am just asking it is good or bad to buy these themes? Or is it ...
0
votes
1answer
15 views

Show Field Collection fields together in same field item

I have a field collection with two fields - Image and Caption. How do I get the two fields to display in the same field item? Right now the HTML is: <div class="ds-1col entity ...
0
votes
0answers
10 views

Converting Drupal 5 to 6, theme_views_view() error

I'm working in Drupal for the first time and working on migrating a Drupal theme from D5 to D6. There doesn't seem to be ANY documentation for the error or issue and I need some help. Again, I've ...
1
vote
3answers
41 views

How to display only one block in custom page using tpl?

How to show only block and hide all other menus,blocks etc., This is my code function example_menu() { $items['appointcal'] = array( 'page callback' => 'example_show', 'access callback' ...
2
votes
1answer
41 views

page--front.tpl.php being ignore in favour of page--node--page.tpl.php

I've got an issue which I'm not sure how to address. I've got a specific page that I've set as front page. I've created a custom template for it and named it page--front.tpl.php and it was as expected ...
0
votes
1answer
18 views

Get delta value of Multifield

How do I get the delta value of a multifield in a View template? I need to get the delta value in the Row output View template.
0
votes
1answer
45 views

Get file ID and path to use in View template

I am working in my Row style template (views-view-fields--MYVIEW--block-1.tpl.php). I need to get the file ID and path of an image. The image field is a multi field, so I need to get all of the images ...
0
votes
1answer
24 views

Print Block heading for $page - section

In my page.tpl.php I have 2 different sections nl. $page['section_orange'] and $page['section_contact']. What I want is for my block.tpl.php to print my heading in h2 when a block is listed in the ...
0
votes
2answers
48 views

Print specific field of a specific node

I have the content type of "Front Page Section" where there are the fields "body" and "field_home_section_photo". On the home page (page--front.tpl.php) I would like to be able to print the body and ...
0
votes
2answers
20 views

How to access and edit files from admin panel?

How i can acces my files without going to host control panel or by ftp. I mean if any module is for that to access and edit files from Admin panel.
0
votes
1answer
24 views

How to format views table using open outreach theme

The Views preview of my table looks like this. Using Open Outreach it appears like this. Neither are exactly what I'd like to see. How can I change the displayed table format (on my site) without ...
0
votes
1answer
39 views

Multiple instances of item in View row

I am getting five instances items in my View row when I wrap image field inside my link field. This is what I have in the template file: <?php foreach ($fields as $id => $field): ?> ...
1
vote
1answer
28 views

How programmatically assign selected menu to superfish menu…?

In my custom theme there is an option to choose navigation menu and type of navigation menu (TB Megamenu and Superfish Menu) from a select list in theme settings page. In my tpl file am able to pass ...
0
votes
0answers
7 views

How to render a menu_block in a specific language (i18n)

I have a special menu that is part of the page. I include it in the template like $block = module_invoke('menu_block', 'block_view', DEF_BOOKLETS_MBID); print render($block['content']); Menu's are ...
0
votes
1answer
12 views

Broken image using custom View template

I am trying to print each row with custom HTML. I need to display the image field wrapped inside the image link. I have this in the tow style output template: <div class="myRow"> <div ...
0
votes
1answer
22 views

Printing fields from View using query

The query below is taken from the related View. How can I get the field value for 'field_data_field_news_link', 'field_data_field_news_source', and field_data_field_news_date' for each row (news ...
0
votes
2answers
36 views

Different row tpl for every row in a view?

Can I create a different row template for every row in a view? Something like views-view-fields--foobar--0.tpl.php, views-view-fields--foobar--1.tpl.php and so on? My goal is to create a slideshow ...
0
votes
2answers
26 views

How to make a specific template according number of nodes in a content type?

I have a content type article and I need a specific template for showing articles according the number of nodes. If I have 2 nodes (content type article) I need to make a template, if I have 3 nodes ...
0
votes
1answer
34 views

Is it possible to theme node add form in drupal 7

I am using zen drupal-7 sub theme. I have created a content type named edison. I need to change the node add form for the user. I've tried adding page--node--add--edison.tpl.php in template.php. I ...
0
votes
0answers
6 views

How to render content for Acquia's Site Search

I have got as far as adding page--search.tpl.php but do not know how to pull in the search string, search results list, or pagination. The documentation is almost non-existent - should I be creating ...
3
votes
3answers
85 views

How to theme Profile 2 fields for anonymous?

I bring this question because I am not able to find the answer in anywhere, my apologies if it is a repeated one. I have a Profile 2 type "curriculum_vitae", that I use to gather jobseekers CV. I ...
1
vote
0answers
20 views

views load all posts but show limited number per page?

I want to use the load more module on a view. The problem I'm having is that I'm using a mp3 player that generates a player based on the number of posts on a page. Example: my page has 10 nodes so 10 ...
2
votes
1answer
31 views

Prevent drupal from adding a favicon from default directory in custom theme

I want Drupal to look for a favicon in a specific directory dynamically. This is mainly because I'm using the domain access module and I'd like the favicon based off the subdomain that is being used. ...
0
votes
2answers
34 views

Naming a template file

D7, bartik. A comment form is created by an .inc file (modulename.page.inc). This comment form is to comment on existing comments. To create the comment form, the inc page says: function ...
0
votes
1answer
32 views

How do I print the output of a field as a link on node.tpl.php?

How do I print the output of a field as a link on node.tpl.php? I'm able to print the raw output of a field using this: <?php $display = array('label' => 'hidden'); $view = ...
0
votes
0answers
34 views

How do I render the primary menu's markup?

I have {{ page.primary_menu }} in page--front.html.twig and I have the following in the .info.yml file of the theme. regions: header: Header primary_menu: 'Primary menu' content: Content ...
0
votes
1answer
26 views

Creating a (candidate) template file

Drupal: 7.x Theme: Bartik I am using the newly created Commune module to display wall posts on a user's profile page (panels.) Each post has a form below it for comments. The comment form is created ...
1
vote
2answers
79 views

How to animate set of titles of a View using JQuery

There is a View of latest news title linked to the node page and I need to display them like this Effect. I've trying to do it by creating a new template file for my views named: ...
0
votes
0answers
14 views

views_embed_view show a related view within a node template

Drupal version: 7.x Goal: Show related questions via embedded view. Situation: A bunch of nodes are of a "faqs" content type each with a taxonomy term. There are three view blocks that pull nodes ...
0
votes
0answers
7 views

Insert code in views-view-unformatted.html.twig for specific rows in views

Twig template - views-view-unformatted.html.twig: #} {% if title %} <h3>{{ title }}</h3> {% endif %} {% for row in rows %} {% set row_classes = [ default_row_class ? 'views-row', ] %} ...
1
vote
1answer
30 views

How to render a views title in .tpl file?

I embed a view in a .tpl file but it doesn't show the title. It only shows the content. How to render the title of the view? I'm using the code below: <?php print views_embed_view('dummy'); ...
0
votes
3answers
72 views

How to add an 'if' statement for a content type in a custom views-view.tpl.php?

Is it possible to add an 'if' statement for a content type in a custom views-view.tpl.php? This is just so I can add text to show if the post in the view is either an 'episode' or an 'announcement'. ...
0
votes
2answers
25 views

How to conditionally load javascript file on view page

I'm trying to load some theme javascript only to one view(multiple displays). I've tried to use the views preprocessor funciton, but maybe I'm doing it wrong: function ...
0
votes
1answer
20 views

How can I seperately display a view's exposed filter and its content in page.tpl?

Using <?php dpm($node) ?> I found the exposed filter, $...->view->exposed_widgets, however I'm not sure how to display it. I tried <?php echo $node->view->exposed_widgets; ?> ...
0
votes
1answer
9 views

Block value in a view row design template

I have a block value which I need to access in a views row design template. I need to check the value of the block content in this template. Does anyone know how?
0
votes
0answers
11 views

Ability to pass data “up” from template_preprocess[whatever] to template_preprocess_page?

I'm using template_preprocess_panels_pane and I have custom css that need to be generated and inserted in the header depending upon data in the panels pane. I can do drupal_add_css from ...
0
votes
0answers
34 views

Unable to get bootstrap working for IE8 on custom theme

I'm attempting to get bootstrap to work for a custom theme. It works fine in everything except for IE8. The page in question has the following content <div class="container"> <div ...