Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Use it for questions about rendering or modifying the HTML markup produced by a module/theme.
2
votes
Accepted
Zen sub theme: page--node--name.tpl.php not working!
Drupal doesn't provide content type based template suggestions for page.tpl.php but for node.tpl.php. That means you can use a template like node--custom-content-name.tpl.php.
However, if you want to …
0
votes
Add conditional stylesheet to URL alias
The simplest and best practice to add a css to user registration form is implementing hook_form_FORM_ID_alter():
function YOURTHEME_form_user_register_form_alter(&$form, &$form_state, $form_id) {
d …
0
votes
Customer render $scripts and $styles
You would like to check Mothership theme, which does exactly what you want.
2
votes
Is there any way to know which theme hook or template is being used to output certain area o...
Yes, there is a module for that: Theme Developer.
Firebug for Drupal themeing
Note that this is a heavy module, enable it only when needed and on your local machine.
0
votes
How to embed a custom content type in a Drupal 7 theme?
Content types and themes are completely different things, and you cannot simply embed a content type in a theme.
1
vote
Assigning css class to a particular block
As far as I know, you don't have to add any code to use the class you set on structure/block/configure. The class should be automatically added to $classes array.
1
vote
Accepted
How to apply function to a chosen region only?
You can use theme_menu_tree__MENU_NAME() to target a specific menu.
3
votes
Accepted
How to pass custom variables in theme_links($variables) function
First, if you want to implement a hook, theme, or template function you replace the prefix with your theme or module name, not prepend it.
WRONG: function ntheme_theme_links($variables)
CORRECT: fun …
4
votes
How to solve “This version is not compatible with Drupal 7.x and should be replaced” error?
Your custom theme is surely not a part of Core package, so remove that line first. Second, you mentioned that the theme is built based on Stark but you didn't define it in the info file, so add this …
2
votes
Accepted
Prevent inheritance link color secondary menu
Try this:
#secondary-menu {
float: right;
}
#secondary-menu a:link,
#secondary-menu a:visited {
color: #ffffff;
text-decoration: none;
}
This way, the menu will be placed on the right, and t …
6
votes
Accepted
How to render set of Form API elements?
Instead of drupal_render(), you should use drupal_render_children().
print drupal_render_children($form["something"]["something"]);
3
votes
How to print a string for flagged nodes?
You can set a new variable in your preprocess function and print it in your node--type.tpl.php as follows:
In template.php
function YOURTHEME_preprocess_node(&$variables) {
$node = $variables['nod …
1
vote
Conditionally load JS based on whether or not a field has data?
I'm assuming that it's a node page, you can do it in your template.php as follows:
function YOURTHEME_preprocess_node(&$variables) {
$node = $variables['node'];
$content = $variables['content'];
…
1
vote
How can I tidy up an auto increment field in a table from within a module?
You should never do that since the IDs are important for addressing to that specific row in other tables. You would never know which modules are also indexed this row with its id. So if you change the …
0
votes
How to theme each nodes in a taxonomy term page seperately in drupal 7
You can do that with Views and Views Nodes Split modules.
Views module has a default view to override taxonomy pages which is disabled by default. You need to enable it first. Then, with the Views No …