Search Results

Search found 6941 results on 278 pages for 'drupal views'.

Page 6/278 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • How do I use a custom #theme function to a fieldset in a drupal module?

    - by Rob Crowell
    I have a module that builds a form that includes a fieldset. Instead of using the <legend> element to render the fieldset title, I want to place this content in a <div> element instead. But I want to change the behavior only for the form returned by my module, so I don't want to place any new functionality into my theme's template.php file. In mymod.module I have defined: // custom rendering function for fieldset elements function theme_mymod_fieldset($element) { return 'test'; } // implement hook_theme function mymod_theme() { return array( 'mymod_fieldset' => array('arguments' => array('element' => NULL)), 'mymod_form' => array('arguments' => array()) ); } // return a form that is based on the 'Basic Account Info' category of the user profile function mymod_form() { // load the user's profile global $user; $account = user_load($user->uid); // load the profile form, and then edit it $form_state = array(); $form = drupal_retrieve_form('user_profile_form', $form_state, $account, 'Basic Account Info'); // set the custom #theme function for this fieldset $form['Basic Account Info']['#theme'] = 'mymod_fieldset'; // more form manipulations // ... return $form; } When my page gets rendered, I expected to see the fieldset representing 'Basic Account Info' to be wholly replaced by my test message 'test'. Instead what happens is that the <fieldset> and <legend> elements are rendered as normal, but with the body of the fieldset replaced by the test message instead, like this: <fieldset> <legend>Basic Account Info</legend> test </fieldset> Why doesn't my #theme function have the chance to replace the entire <fieldset> element? If I wrap a textfield in this function instead, I am able to completely replace the <input> element along with its label. Furthermore, if I provide an override in my site's template.php for theme_fieldset, it works as expected and I am able to completely replace the <fieldset>, so I know it is possible. What's different about providing #theme functions to fieldsets inside a module?

    Read the article

  • Drupal show / hide fields in view

    - by SteD
    I would like to show / hide certain fields in my Drupal view accordingly to the user role. Provided I can only have this view to work with, how can I achieve this programmatically or there's some settings that I am not aware of in Drupal. P/S: I am aware of the access settings under basic settings in View but that would restrict access to the whole view, not field level.

    Read the article

  • Drupal 7: Create a taxonomy term for each node and use the node title as the term name

    - by Spre3
    Is there anyway of doing this by using rules or by some custom code? I did try using rules but I can't find a way of adding a new term and set the name as the node title because the [node:title] token is not avilable. I know this is possible using the NAT module but the way this module changes the taxonomy terms hierarchy if you add a term reference field that uses the same taxonomy vocabulary which ruins the whole purpose of what I am trying to do.

    Read the article

  • Drupal CCK 3 Multigroup tables with views

    - by henrijs.seso
    Hi, Each node have CCK-3-dev multigroup with 3 fields. Can I use one of fields as table header? Values of this field are taken from Taxonomy. With a simple recipe example, where food Z and Y are 2 nodes with recipes and each node has multigroup with ingredient name (milk, fish), amount (numbers) and unit (g, kg). Is there a way to create a table like this with views, I want to use views calc to calculate total amount of ingredient needed to prepare multiple recipes: Ingredient A Ingredient B Ingredient C Food Z 200 g 700 g 0 g Food Y 500 g 1000 g 50 g I don't even need units by number, but that would be good too. Anyways, how do I get this?

    Read the article

  • Drupal - Lightbox -> iframe node displaying entire website with views

    - by kilrizzy
    I am attempting to make a view that would list thumbnails of my projects, then when clicking them enlarge the photo using lightbox and list out some text and a link to the website. I am not sure if there is a way I can just add text to the lightbox using views so right now I have it using a field for Lightbox2 iframe: thumb200wh-node page. Open my entire website again in the lightbox instead of just the node: http://jeffkilroy.com/portfolio_boxes Is there a way to just display the node from the views module or is there a way to just use an image but modify the description so that I can put text in?

    Read the article

  • Drupal, Views, Exposed filter: custom default selected tags

    - by Patrick
    hi I'm using Drupal, Views with a exposed filter (using taxonomy). My customer wants to set from back-end the default selected tags (in order to pre-filter the views content). In the exposed filter settings, there is functionality. However, it doesn't work properly: when I click on "Select None" link (I'm using better_exposed_filter module) I expect none of the tags are selected, instead, the default configuration (default selected tags) are selected, so actually it doesn't work anymore. I hope it is clear. So, I was wondering if I can prepare a custom menu in which my user can check/uncheck the default selected tags in the view. thanks

    Read the article

  • Count number of results in a View

    - by Jukebox
    I need to count how many people belong in pre-defined groups (this is easy to do in SQL using the SELECT COUNT statement). My Views query runs fine and displays the actual data in my table, but I simply need to know how many results it found. However there doesn't seem to be a COUNT option in views. I am guessing I am going to have to use some sort of views hook, and then stick the result in the table. Here's a quick example of what i'm trying to achieve: My Table ---------------------- Group A | 20 people Group B | 63 people and so on. (I've tried using the Views_Calc module, but I get errors because it is not quite stable yet.) Anybody know of an easy way to count results in Views?

    Read the article

  • Drupal Views: Render Null Result for Relationship as 0

    - by Kyle S
    I have a View configured in Drupal to return nodes, sorting them by their average vote in descending order. For the purpose of the View, the value of the average votes is a Relationship. I noticed that nodes with no votes are displayed after nodes with a negative average. Nodes with no votes should have an average of 0, but I believe the MySQL JOIN is causing NULL values to be returned (as there are no matching rows in the joined table, since a row is created after the first vote is cast for that item). I discovered that with MySQL it is possible to output all values that are NULL in a column as another value with IFNULL(column_name,'other value'). I feel like I would need to modify the Views module in order to obtain this functionality, but I'm hoping that there is some sort of option that returns NULL values in a relation (a relation doesn't exist for the item) as 0 instead of NULL, so that I can properly sort the nodes. The modules I am using include Views, Voting API, Vote Up/Down, and CTools. Thanks.

    Read the article

  • Rails vs. Drupal [closed]

    - by joker13
    I was querying indeed.com/salary to investigate general market trends. When comparing ruby on rails with drupal, you would observe a substantial difference between these two. I'm not sure if the data on indeed.com is reliable or not but I'd appreciate your comments if you have ever tried both rails and drupal. Actually I am a .net developer considering an alternative to my asp.net mvc skills and I like to learn some non-microsoft web programming skills as well.

    Read the article

  • Drupal node_save and special characters.

    - by Pierre
    Hello, i'm trying to create nodes and taxonomy terms through a custom php script by using the node_save() function. I'm working on drupal 6. It's working well (thanks to previous questions on stackoverflow) except for accented letters. Indeed, when a title or a taxonomy term contain "é", "è" or "à", the sentence is cut before those special characters. For example, a title like that: "Bonjour les éléphants" will create a node with "Bonjour les " as title. I don't know if it's linked to my database or if i have to use a special encoding in php (iconv() blabla) The fact is, for drupal titles, i can not use html encoding (for example: é is é in html) because drupal will render &eacute and not é... When i create a taxonomy or a title manually, i have no problems and the accented letter is saved in the database as "é". Soo if you can help me to create terms and title with accented letters, that will be great : ) Thank you !

    Read the article

  • Dropdown Menus In Drupal?

    - by Wade D Ouellet
    Hi, I have my Drupal site here so far: selkirk.treethink.net Each Primary Link at the top has a bunch of other primary links under it (sub links) I need to display these sub links when you hover over the parent primary link in a dropdown menu. Everything is in the primary links but there are parents (what you see at the top of the demo) and sub links (what should be in the dropdown). I'm not sure if I set up these menus wrong though...Drupal is a little awkward for me. I did download this module but I am not sure how to get it going to automatically dropdown a primary link's submenu items when rolled over: http://drupal.org/project/jquery_dropdown Thanks, Wade

    Read the article

  • Duplicate a Drupal installation from one server to another

    - by irot
    Hello. I have been developing a Drupal 6 site on my PC using XAMPP. I'm done now, and everything looks peachy. Problem is, I need to put all my content (including custom modules and themes) up onto a staging server which only has a fresh Drupal 6 install on it. I can't imagine having to set up all my custom content types and whatnot all over again on the staging server. So I ask, how does one go about doing what I need to do? Which is essentially duplicating my Drupal install from my PC, to the staging server. The staging server is running Linux, and I develop on a Windows PC, if that helps. Thanks in advance.

    Read the article

  • drupal: so many js and css files ?

    - by Patrick
    hi, I've realized I'm loading a lot of resources (24 css and 17 js files) using Drupal. I've several modules installed and they all come with a css and js file. For my website I'm only using 1 additional js plugin (all the other 16 come with Drupal modules). I've not installed useless modules. They are all necessary, and they require js such as swfobject, ajax_views, jquery.media, spamspan, lightbox (modal, video and default js files), etc Same thing with css files: ckeditor, filefield, lightbox, tagadelic, uploadfield, fieldgroup, vews, taxonomy_super_select, html-element, tabs, messages... etc For my website, I only use my theme css zen.css of course. So.. is this normal ? Or I should remove all this stuff? Are drupal websites normally heavy ? thanks

    Read the article

  • Drupal, Lightbox: cannot edit the content inside

    - by Patrick
    hi, I'm using Drupal and Lightbox module to display the content of articles in this website: donatellabernardi.ch/drupal if you click on an article the lightbox is displayed. However I have 2 problems with it: 1) I cannot use the libraries such as the tooltip library qTip from it. (If you move the mouse over the balls, you'll see the tooltips) 2) I cannot invert the title with the balls (tags), because it seems that the template of the node in the lightbox is not controlled by my theme. I tried also to change the node template (in the drupal root folder), swapping title and meta data but it didn't work. thanks

    Read the article

  • drupal views block arguments

    - by slimcady
    I currently have a view (Drupal 6 using Views2) that properly aggregates a custom content type (videos) and filters them for a page display. When I create a block display, it previews the results in live preview just great, but when i go to the page expecting to see the block it doesn't appear. I'm fairly certain the argument I'm attempting to pass it fails because when I select "Display all results" for "Action to take if argument does not validate:" the block shows up on the page just fine. Any advice definitely appreciated.

    Read the article

  • Drupal: View with exposed Taxonomy filter.. 3 questions

    - by Patrick
    Hi, I'm using Views module and an exposed taxonomy based filter, to allow users to select a subselection of articles. I need to further customize my filter: 1) I want the user able to order the tags alphabetically by clicking a checkbox (if this checkbox is unchecked the default order is reset. 2) I want all tags selected in the beginning to show my user all the articles. (Additional tags can be added by the user later, so I cannot just select all the tags in Views settings, because the new ones would be uncovered). thanks

    Read the article

  • DRUPAL: order exposed filter items, be carefully it is not that simple (I cannot user "Sort")

    - by Patrick
    hi, DRUPAL question. I'm using Views, with an exposed filter (Taxonomy). I've downloaded the "better exposed filter" module to display it as checkbox list. a Now, how can I order the tags in the filter list ? "Views Sort" is not the solution because I only can order articles but not the filter items!! I want to add an option (checkbox) for the customer to order the tags alphabetically or leave them in the default order. thanks

    Read the article

  • Drupal: Convert taxonomy term name to term id

    - by gigantorTRON
    Using 'taxonomy: term ID' as an argument in one of my Drupal views and I'm having trouble getting it to work correctly. On the views administration page it states, "if using term name, it is generally more efficient to convert it to a term ID and use Taxonomy: Term ID rather than Taxonomy: Term Name." How does one go about converting the term name from a URL into a term ID?

    Read the article

  • Drupal 6: Group multiple values in tpl.php

    - by Jozzeh
    When using the date and views module, you can specify in views (using row style fields) 'group multiple values'. Which is default on. If you turn it off, you get multiple nodes each with a date. For example: - 24th March ------- node1 - 25th March ------- node1 What I'm trying to figure out is: what if you are not using fields but node as Row style. How do you implement this not-group-multiple-values in your type-node.tpl.php?

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >