Search Results

Search found 1740 results on 70 pages for 'drupal theming'.

Page 32/70 | < Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >

  • Multiple ListBox's in Drupal CCK?

    - by Satya
    Hi, I want to create content type with multiple ListBox's which populate dynamically depending on the previous. E.x. If user selects the continent the next list box shows the list of countries present in the continent .

    Read the article

  • how to insert page view of a node in another page in drupal

    - by sprugman
    I have a list of node ids and I want to display the 'page' view of each one. For various reasons, I don't want to do this with views, and don't think I should need a module. Just an API call to theme('node'). Something like: $nids = array(3,4,5); foreach ($nids as $nid) { $node = node_load($nid); $result .= theme('node', $node); } but I'm not getting back the full page view of the node. I added this to my node-[type].tpl.php file: if ($page) print "PAGE MODE "; else print "NOT PAGE "; if ($teaser) print "TEASER MODE "; else print "NOT TEASER "; and got: NOT PAGE NOT TEASER I seem to be in some kind of limbo. I suspect there's an argument that I add to the theme function, but the terms are all so general (theme, teaser, page, node), I'm having trouble with my google-fu.

    Read the article

  • Flush() not working in drupal

    - by fawad
    I'm trying to post data from one node to another. The other node contains the for loop which iterates for long time and finally generates the table. I want to display the result after each iteration. I have tried to put "flush();" but it is not working. What should i do to display each iteration result on the node page? Note: If i do it with ob_flush() it works but it then starts printing data above the header which is not suitable. I want all the data inside the node.

    Read the article

  • drupal hook_menu_alter() for adding tabs

    - by EricP
    I want to add some tabs in the "node/%/edit" page from my module called "cssswitch". When I click "Rebuild Menus", the two new tabs are displayed, but they are displayed for ALL nodes when editing them, not just for the node "cssswitch". I want these new tabs to be displayed only when editing node of type "cssswitch". The other problem is when I clear all cache, the tabs completely dissapear from all edit pages. Below is the code I wrote. function cssswitch_menu_alter(&$items) { $node = menu_get_object(); //print_r($node); //echo $node->type; //exit(); if ($node->type == 'cssswitch') { $items['node/%/edit/schedulenew'] = array( 'title' => 'Schedule1', 'access callback'=>'user_access', 'access arguments'=>array('view cssswitch'), 'page callback' => 'cssswitch_schedule', 'page arguments' => array(1), 'type' => MENU_LOCAL_TASK, 'weight'=>4, ); $items['node/%/edit/schedulenew2'] = array( 'title' => 'Schedule2', 'access callback'=>'user_access', 'access arguments'=>array('view cssswitch'), 'page callback' => 'cssswitch_test2', 'page arguments' => array(1), 'type' => MENU_LOCAL_TASK, 'weight'=>3, ); } } function cssswitch_test(){ return 'test'; } function cssswitch_test2(){ return 'test2'; } Thanks for any help.

    Read the article

  • Default values for Content Taxonomy fields in Drupal

    - by lazysoundsystem
    I'm trying to set the default value for a Content Taxonomy field in a hook_form_alter, but can't pin down the necessary format. I've tried this and many variations: foreach (element_children($form) as $child) { // Set $default_value. if ($form[$child]['tids']) { // This, for Content Taxonomy fields, isn't working: $form[$child]['tids']['#default_value'] = array('value' => $default_value); dsm($form[$child]['tids']['#default_value']); } else { // This, for other fields, is working: $form[$child][0]['#default_value']['value'] = $default_value; } } Can anyone tell me what I'm missing?

    Read the article

  • drupal POST Content-Length exceeds the limit

    - by Arun
    hi i got list of warning regarding file size when i try to upload an image using file upload. "POST Content-Length of 12223490 bytes exceeds the limit of 8388608 bytes in Unknown on line 0" My question is how to avoid displaying warning messages (i got 5 warnings).

    Read the article

  • drupal rules module - add fields to email

    - by bert
    I am looking for the syntax to add node fields to the body of an email. Examples I looked at indicate the the format is: [content_type:content_type_title] However my email arrives with just the string : [content_type:content_type_title] Even better would be a PHP snippet that loads the node and dumps filed title and filed value into the body of the message.

    Read the article

  • drupal taxonomy

    - by slimcady
    I have several different content type nodes (videos, image galleries, stories...) that I would like to categorize and create a top-level page that aggregates these nodes. So for example, the top-level page would have teaser thumbnails very similar to the front page view but of course filtered for that topic (like for instance automobiles, and motorcycles would have its own page, etc...). What is the best way to accomplish this? Taxonomy? Views?

    Read the article

  • Drupal: How to Render Results of Form on Same Page as Form

    - by Aaron
    How would I print the results of a form submission on the same page as the form itself? Relevant hook_menu: $items['admin/content/ncbi_subsites/paths'] = array( 'title' => 'Paths', 'description' => 'Paths for a particular subsite', 'page callback' => 'ncbi_subsites_show_path_page', 'access arguments' => array( 'administer site configuration' ), 'type' => MENU_LOCAL_TASK, ); page callback: function ncbi_subsites_show_path_page() { $f = drupal_get_form('_ncbi_subsites_show_paths_form'); return $f; } Form building function: function _ncbi_subsites_show_paths_form() { // bunch of code here $form['subsite'] = array( '#title' => t('Subsites'), '#type' => 'select', '#description' => 'Choose a subsite to get its paths', '#default_value' => 'Choose a subsite', '#options'=> $tmp, ); $form['showthem'] = array( '#type' => 'submit', '#value' => 'Show paths', '#submit' => array( 'ncbi_subsites_show_paths_submit'), ); return $form; } Submit function (skipped validate function for brevity) function ncbi_subsites_show_paths_submit( &$form, &$form_state ) { //dpm ( $form_state ); $subsite_name = $form_state['values']['subsite']; $subsite = new Subsite( $subsite_name ); //y own class that I use internally in this module $paths = $subsite->normalized_paths; // build list $list = theme_item_list( $paths ); } If I print that $list variable, it is exactly what I want, but I am not sure how to get it into the page with the original form page built from 'ncbi_subsites_show_path_page'. Any help is much appreciated!

    Read the article

  • Drupal subscriptions to taxonomy only

    - by Disco
    Playing around with the subscriptions module; i have some troubles getting it to send the right notification for right subscription. Here's the situation : I have a content-type of type 'work'; it has a cck-taxonomy field; when creating the content users choses one category in which his 'work' fulfills. In user profil, under Categories (user/3/subscriptions/taxa) I choose two categories, lets say 'house work' and 'car work'. When creating a new 'work' content I do not get the notification. But, when manually select 'content-type' in user's profile of type 'work' I get the notification e-mail but independant to which 'category' i had chosen. This is quite annoying since I only want the user to receive his notifications upon the taxonomy he has chosen, not for every new content of type 'work'. Am I missing something obvious here ?

    Read the article

  • user specific persistent cck types in drupal

    - by Fion
    Is there a way to do the following. We need to have a few basic cck types that will allow users to track their chosen parameters over a length of time. For example, one cck type may be called "numeric tracker" It would have a field for labeling the type and a field for entering a number. User A might label one numeric tracker "miles driven". Then each day user A would use this type to enter a number. User B might label a numeric tracker "hours slept". Each day user B would enter a number. Is there a way to use cck in this way?

    Read the article

  • Hide header if node body is empty - Drupal php snippet help

    - by Toxid
    Hello! I've made a content type for links, I'm trying to make a link directory. People only have to submit the link, description is voluntary. If no description is entered, I want the header that says "description" to disappear. The description field is the node body. Right now my snippet looks like this <?php if (!empty($node->body)) {?> <div class="field field-type-link field-field-link-archive"> <h3>Description</h3> <?php print $node->content['body']['#value'] ?></div> <?php }?> I expect this to check if node body is not empty, and if it isn't it'll print what's there. The problem is that the Description header is still printed out even if the node body is empty. Can anyone see what's wrong?

    Read the article

  • Pass form data from block to a page view in Drupal

    - by abdesignuk
    I am using the location module and views module for a postcode search, which works fine in a page display using views. However I want the user to be able to enter their postcode into a block on the homepage and clicking submit my module sends them to the page created in views and the postcode is set as a session S_SESSION['postcode'] before sending to this page, next I want the location page to load but using the session to display the locations automatically. Any ideas I am using hook_form_submit() and inside that declaring the $form_state as a session and then using $form_state['redirect'] to sent to the views page path.

    Read the article

  • drupal adding onchange event to node form

    - by Arun
    hi i need to know how to add attribute onchange to a custom content_type field? For ex my content_type has 2 fields phone (name:field_phone[0][value], id:edit-field-phone-0-value),email (name:field_email[0][value], id:edit-field-email-0-value). i'm unable to add attribute as follows. function knpevents_form_event_node_form_alter(&$form, &$form_state) { $form['title']['#attributes'] = array('onchange' => "return titlevalidate(0)");//fine $form['field_evt_org[0][value]']['#attributes']= array('onchange' => "return organiservalidate(0)"); //error $form['field_evt_org[0][value]']['#attributes']= array('onchange' => "return organiservalidate(0)"); //error } how to add it

    Read the article

  • Drupal: link to latest node of a certain content type

    - by james6848
    I have a link within a block. At the moment it goes to a list of newsletter nodes: <p><a href="<?php global $base_url; print $base_url;?>/news-events/newsletter">Read our latest newsletter</a></p> What I would prefer is to have it go to the latest node of the content type 'newsletter', is this possible?

    Read the article

  • Drupal: Views: grouping relationship in block list

    - by Ronn
    I have a question about views, specifically about grouping a relationship. I have a "partner" node that has many "docs", I want to list the name of the "partner" along with its corresponding "docs" below. I have the relationship set up correctly(I think) but can't figure out how or where to group it correctly. I get this: partner name 1 - doc name 1 partner name 1 - doc name 2 partner name 1 - doc name 3 partner name 2 - doc name 4 partner name 2 - doc name 5 partner name 3 - doc name 6 but would like this: partner name 1 - doc name 1 - doc name 2 - doc name 3 partner name 2 - doc name 4 - doc name 5 - doc name 6

    Read the article

  • Drupal best way to change text

    - by booze2go
    Hi Guys, I'm using the module "simplenews" and during the registration process it reads "Select the newsletter(s) to which you wish to subscribe.". I'd like to change this line and wanted to ask what the best way is to do so without hard coding it? Thanks in advance!

    Read the article

  • Drupal Feeds showing encoded HTML markup

    - by JonB
    Can't figure out why this is happening, but my RSS feeds are showing HTML encoding in the description field that I need to get rid of: For example: <description>&lt;div class=&quot;field field-type-text field-field-location&quot;&gt; I just can't figure out why this would be happening.

    Read the article

  • Drupal print module: controlling layout in PDF files?

    - by WhyKiki
    So I'm trying to fix the layout of the PDF files for a specific content type. I'm messing around in the tpl.php file and can't find a way to modify individual fields. There's just the massive $print['content'] variable that contains all of the page content. So, is there a way to access each field?

    Read the article

< Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >