Theme templates are part of Drupal's theming system and allow for the customization of Drupal sites.
0
votes
1answer
13 views
Display Taxonomy Field vs Default Taxonomy text w/out New modules
I have a node with taxonomy term reference fields. The taxonomy term has an image field. Without installing extra modules (I already have WAY more than I should have) is there a way to display a ...
0
votes
1answer
15 views
override variable in template.php with variable from module_preproccess_node
I create custom template for node, and put variable in template.php
$colors = array('black', 'white');
$variables['group']['color'] = $colors;
$variables['size'] = 'double';
then i also create ...
1
vote
2answers
27 views
Get field value directly from inside views-view-list.tpl.php
Inside views-view-list.tpl.php there is a loop like this:
<?php foreach ($rows as $id => $row): ?>
<li class="<?php print $classes_array[$id]; ?>"><?php print $row; ...
0
votes
0answers
25 views
Print Custom Terms Fields of Taxonomy in page.tpl.php
Hi I am not an Expert in Drupal. I am facing a problem displaying value of taxonomy terms custom fields in page.tpl.php. What i have already done for this:
Firstly i created a custom field in ...
0
votes
2answers
24 views
Accessing sub-array data from theme_field__custom_content_type($variables)
This is a mix of a PHP and a Drupal question.
I created a custom function...
theme_field__custom_content_type($variables)
I have the DEVEL module installed and have been using it profusely. I'm ...
1
vote
2answers
22 views
$body variable not working
I am in a custom tpl.php file [node--netrunner-card--Operation--full.tpl.php].
This is for a custom content type [netrunner_card].
I am trying to output the contents of the $body variable and unable ...
0
votes
1answer
17 views
Custom template for view page
When i created custom template for view page using 'theme information' in views,it's not affecting the page.What is the proper way to create template for view pages?
-3
votes
1answer
33 views
Looking for a tpl.php cheat
I am wanting to develop some VERY simple tpl.php files. I would like to just open a WYSIWYG and edit them quickly, outputting the html that I can then copy-n-paste into the specific tpl.php files for ...
1
vote
1answer
21 views
Using different markup for views last item
I need to use different markup for last item displayed by views. Using first last css item does not do the job for me. I assume I would need custom php template probably views-view-fields.tpl.php. ...
3
votes
1answer
20 views
How to replace internal links with a view (similar like the Open Graph feature)?
I would like to have the feature, that if users on my site post internal links within a text, this links are replaced by a thumbnail, node title etc. For choosing what to show instead of the link I ...
2
votes
1answer
20 views
How to make custom jquery method accessible from Drupal.behaviors, across multiple javascript files?
I have a custom views plugin. When the view is displayed, the javascript below gets loaded. Note the custom method, do_stuff, which gets called from within Drupal.behaviors.
(function ($) {
...
1
vote
3answers
70 views
How to show a content without creating node for it on Drupal site?
I am creating a custom node page called node--mynode.tpl.php.
The code I'm putting in is <p> test</p>
Unfortunately nothing shows up on my Drupal site.
I have also added a node.tpl.php on ...
1
vote
1answer
20 views
Alter markup around a webform [duplicate]
I have been trying to alter the markup generated by my webform. .
Example changes which I would like to do:
Add the class "form-horizontal" to the classes under <form class=""/>.
Add the ...
1
vote
0answers
27 views
How to render-print content type fields in an article?
I am building a Drupal website and came across with an issue.
I have created a content type called "comments" with 4 fields :
-comment1 with machine name: **field_comment_1**
- comment2 ...
1
vote
1answer
37 views
How to access $user_profile in page.tpl.php or $page in user-profile.tpl.php in Drupal 7?
I need to change layout of a profile depending on user's field. So, I need to either include regions in user-profile.tpl.php or access $user_profile to test that field in page.tpl.php.
I've seen this ...
0
votes
0answers
9 views
Edit the the taxonomy term refernece display in an omega subtheme
I permit myself ask a question which touches a large subject of which I am largerly ignorant, and for which lots of documentation exist.
I would like to add a custom template for rendering taxonomy ...
0
votes
1answer
26 views
How do I make my homepage slideshow to fit the page width?
I have my website built in Drupal 6, and I have used the Views slideshow module for the home page banner which is 960 pixel wide. I need a banner with 100% width to fit the page. Can anybody help me ...
0
votes
1answer
28 views
layout content in columns
I'm trying to figure out someway to allow end-users to format page content into columns. Right now if they edit a page they get a title field and a body field which is fine a lot of the time but what ...
1
vote
2answers
24 views
Custom module's output is not wrapped in the site theme
I've put together my first Drupal 7 custom module. I've implemented hook_menu() to get it to path correctly, but I cannot seem to get the output wrapped in the page tpl.
I can visit ...
0
votes
1answer
22 views
Drupal 6: using template based on browser version
Is it possible to serve up a specific page template based on browser version? If I can satisfy my IE 7 requirements with a special template, I'd prefer that rather than loading a bunch of extra css ...
0
votes
1answer
41 views
How to change the user-profile.tpl.php file to a customized outline like Linkedin for Drupal 7?
I'm using Drupal 7.9 for an internal website. I'm trying to customize the "user-profile.tpl.php" file so it shows the fields that I've customized in the "admin/config/people/accounts/fields" to be ...
0
votes
1answer
36 views
Custom template file field output
I have a Netrunner Card content type. (It's a card game I play.) I have a "field_card" field that holds the card image.
In the node--netrunner-card--Runner_Identity_Card--full.tpl.php file, I am ...
0
votes
0answers
27 views
How to override page.tpl.php for given content type? [duplicate]
Please suggest that naming convention for content type
content type machine name : test_content
I need to define separate page.tpl for this content type.
I tried page--test_content.tpl.php and ...
-1
votes
1answer
36 views
How can I debug this JavaScript issue?
I have a very annoying JavaScript issue on my Drupal 7 website. For debugging purposes, I've included a slideshow in the page.tpl.php file so it can be rendered on all pages (including the front ...
0
votes
0answers
10 views
How do I theme the Organic Groups “People in group XY” page?
I am using the OG module which is embedding a module defined master view in a page. It is shown on the OG /group/node/%/admin/people page. I would like to make some conditional changes to the table ...
1
vote
1answer
29 views
How to print a CCK image field alt text in a node template?
I'm trying to add the alt text from a cck image field in a Drupal 7 node template. Getting the image style url is done, but I can't figure out how to just get the alt text. This is what I have
...
0
votes
1answer
34 views
How to rewrite the value of an array element in page.tpl.php
I'm totally new to PHP programming and modifying the values of Drupal output with php customisations, so sorry if this question seems dumb.
In Drupal 6 I need to rewrite the value of the array ...
4
votes
1answer
41 views
What is the difference between path and theme path in theme registry?
I'm trying to alter the theme registry:
function comment_simplify_theme_registry_alter(&$theme_registry) {
$module_path = drupal_get_path('module', 'comment_simplify') . '/tpl';
...
0
votes
0answers
17 views
Can I use static classes in template files?
Can I reference data as:
<?php print t(OgNotifyAttendHelper::findWelcomeName($user)); ?>
The class is included in the .info file for a module, and this template is accessed via hook_theme ...
-1
votes
0answers
38 views
What are some free themes for a non-profit? [closed]
We have a non-profit Drupal 6 website where we want to implement something very similar to http://www.wateraid.org/uk. Essentially, we want a large moving picture in the front, a big and prominent ...
0
votes
2answers
74 views
Create custom variables for a template file inside a menu callback function
here is a good one that has always stumped me.
I would love to see a solution in both D6 and D7.
I create custom modules and usually work with the menu api to create menu type -> MENU_CALLBACK.
...
0
votes
1answer
23 views
Search template suggestions from a module
I have created a custom search module that integrates with Drupal 7 Search Interface. My module is called history_search and in the module I have two files: history_search.module and ...
0
votes
1answer
29 views
How to get contextual filter of a view from page.tpl.php?
this is my page view path /news/[years]/[month]
I want to get year and month from path, how can do it ?
Thank you.
1
vote
1answer
13 views
How can I use a views template to modify the titles of taxonomy links?
I have a view that shows a field which is a taxonomy term reference set to display each term as a link. The taxonomy names are quite long so I want to rewrite them using a views template.
I made a ...
0
votes
1answer
20 views
Using drupal_add_content_region()
I am trying to dynamically add content into a region.
In the preprocess function, I use the following code.
function firsttheme_preprocess_page(&$vars){
drupal_add_region_content('dev', ...
0
votes
1answer
34 views
Rendering Module Code to HTML
Semi-new to Drupal. I'm trying to find a way to render HTML inside my custom module.
Right now I'm using this method
$page = 'hello world';
return $page;
Which can get pretty dirty once you had ...
0
votes
1answer
32 views
Drupal 7 skip loading the template for ajax requests
I am trying to upload an image in my template page, using jquery ajax-form submit.
And i am returning just the image name after it is uploaded in the module function.
However, i am getting the entire ...
1
vote
2answers
61 views
How can I remove the space between fields show in a view that are output with a custom template?
I have a view that has two fields, A and B. Both of these fields are modified using a views-view-field--myfield.tpl.php file.
In my output, I want the fields to be displayed as:
AB (no space in ...
0
votes
2answers
74 views
Views: Apply a wrapper to every 3 and 6 group of rows
My Views Output is as follows
<div class="views-row-1">Content</div>
<div class="views-row-2">Content</div>
<div class="views-row-3">Content</div>
<div ...
0
votes
2answers
38 views
Adding memory to themed pager?
I have a content type called as People that lists all users on the site.
Next i have a view PeopleList that lists the content type People in a list form and has a pager.
I have customized the pager ...
0
votes
0answers
24 views
field label class
How do I add a class to the label of every field of a specific content type.
Module?
Theme?
Is this possible?
I'm using the bootstrap theme, if that makes any difference I can see that this theme ...
0
votes
1answer
42 views
LESS could not create a directory in public:
I am creating a site with drupal 7.15 with bootstrap and using less. But when i reload the page i found the following errors. (dope is my sub-theme name)
LESS could not create a directory in ...
0
votes
1answer
42 views
Add Menu Block (module) Menu To Page tpl
Hello i am trying to avoid using the block system with drupal. Im using panels and i dont like having to add the main content if i use any block in a region. anyhow.... i was hoping to add a menu ...
2
votes
1answer
64 views
Register a module theme implementations
I have created a simple module to display frequently asked questions (FAQ). The output (faq content ) can be customize in mymodule-template.tpl.php file located in a module directory.
I'd like to ...
0
votes
1answer
70 views
Drupal7 user reset password link not working
Hi i have created a custom hook in my own themeplate
function mytheme_theme() {
$items = array();
$items['user_pass'] = array(
'render element' => 'form',
'path' => ...
0
votes
2answers
169 views
Drupal 7 website with landing page and two sections with different templates
I need a Drupal 7 website with 2 sections..
for eg. www.example.com
One is Civil and the other is MEP.
Landing page with navigation to the below two sections:
section 1: www.example.com/Civil
...
2
votes
2answers
52 views
Assigning Template for Parts of Pages
I'm new to drupal and coding so I'll try and explain best I can the issue I'm having.
I'm on Drupal 7, using Zen Sub Theme
I have a site which is essentially a database of gadgets. 'gadget' is a ...
1
vote
2answers
74 views
Render a Views row ID using NID (Node ID)
I can easily add NID (Node ID) as a field in my view and then render it as a class for the Views Row using replacement patterns for the row class of an unformatted typical view. (See screen capture).
...
0
votes
1answer
42 views
Change Content region width when Sidebar has content?
hello i have what i feel is (hopefully) an easy problem to solve. Basically i have my regions defined which is fine but i have my sidebar that i want to display on the right of the content region. if ...
1
vote
1answer
62 views
How to print multi-value link image CCK field in template?
I have a multi-value CCK field set up using the Link Image Field module, and I need to print all of the images (linked) on the content page. I used the code below to print the images themselves, but ...






