cck

How to quickly theme a view?

I've defined a view with the CCK and View 2 modules. I would like to quickly define a template specific to this view. Any tutorial or information on this ? What are the files I need to modify ? Here are my findings: (Edited) In fact there are two ways to theme a view : the "field" way and the "node" way. In "edit View", you can choos...

How do you remove the default title and body fields in a CCK generated Drupal content-type?

When you create a new content type in Drupal using the Content Creation Kit, you automatically get Title and Body fields in the generated form. Is there a way to remove them? ...

Missing label on Drupal 5 CCK single on/off checkbox

I'm creating a form using the Content Construction Kit (CCK) in Drupal5. I've added several singe on/off checkboxes but their associated labels are not being displayed. Help text is displayed underneath the checkboxes but this is not the desired behavior. To me the expected behavior is that the label would appear beside the checkbox...

Can CCK take care of my fields for a programatically defined node type in drupal?

Does the CCK api allow me to create a node type, from a custom module, with a bunch of fields that use CCK to store their state? If so can these fields be locked so that users may not alter them, but still allow the user to add more fields to the node type? Thanks ...

Drupal 6 : CCK : Views2 : What ways would you substitute an image for a view-field

Background: Customer X has a CCK-based Content Type (vendorxxentry) and is using Views2 to generate a listing of all the vendorxxentry nodes in a simple table. One of the fields in vendorxxentry is called "vendorxxattitude", which appears as one of the following enumerated possible values: happy sleepy dopey grumpy Customer X has f...

How to theme a node differently depending on being inside nodereference

I'm creating a newsletter content-type that should have its stories linked using a nodereference field. I to have one theme for the stories when they appear in the newsletter, and another when they appear in ordinary views or in their own page. I have two reasons: Later I'll want to send the newsletter by mail and I'll have to make a...

Theme a CCK input form in Drupal 6

In my template.php file I've this: function myadmintheme_theme(&$existing, $type, $theme, $path) { return array( 'node_form' => array( 'arguments' => array('form' => NULL), 'template' => 'ccktype', ), ); } And I've a ccktype.tpl.php in the same dir: <b>works!</b> But is not working, if I enter to node/add/cckt...

Drupal CCK: how to output a node teaser with its fields?

Hi, In a module of mine, I'd like to output the node teaser. The node has CCK fields, and I'd like them to be displayed accordingly to the visibility settings you can choose in the content types / field settings administration area. But when I do: $html = theme('node', $n); the resulting teaser won't contain the CCK fields, only tit...

Use SQL to Filter Drupal Views

I have a content type with a CCK integer field which takes a unix timestamp. I would like to create a view with a filter that takes the MySQL function "UNIX_TIMESTAMP": If there is no way of doing this, how can I alter the SQL generated for the view? ...

Creating Drupal CCK content programatically/ via API

Hi, I am working with a Drupal 6.x system to create exercise / personal training programmes, and am using the CCK with content types of Exercise and Programme, where Programme contains a few header fields and a list of node references to the exercises it consists of. This works great and I can manually create programmes which work fine....

Drupal 6: Altering a CCK form on a page created by the menu system

Hello, I'm a drupal newbie (but experienced with PHP). I've created some functions to display pages and mapped them onto urls using menu functions. In one of these functions, I'd like to grab a form for a CCK content type, have my way with it, and spit it out onto a template. So I have a function projectadmin_create_page(), which gra...

Advanced search with Drupal (Views and CCK)

Hi. I'm building a site where products are hold in a content type created with CCK. Products can be associated with multiple taxonomy vocabularities. Now I need an advanced product search which user could use to search by many search arguments (taxonomy terms, CCK field values). I have done quite a lot googling but I haven't been able t...

Feedback form on Drupal 6 CCK content type

Hi, This is a follow on to my previous question http://stackoverflow.com/questions/772880/creating-drupal-cck-content-programatically-via-api which is now pretty much complete. I have a system in Drupal 6 which uses the CCK quite extensively and generates exercise programmes for users based on their preferences. The programmes are Con...

Drupal 6: Taxonomy splot up in managed fields?

So you have two taxonomies, namely: "Business Type" and "Location" This is assigned to a node called BUSINESS. In effect, when the user creates a BUSINESS node, her has to choose for example, location "New York" and type "Information Services". My problem is when: a) Capturing the taxonomy, and b) Displaying the taxonomy I want the two...

ImageField not showing in CCK under Drupal 6

I'm running Drupal 6.12 and I've installed the CCK, ImageField, FileField and ImageCache modules. I've create a new content type called 'Photo' and then click on 'Manage Fields', so that I can add an ImageField to this content type. When I do this, ImageField isn't in the drop-down list. I've searched around and other people don't see...

Customizing gallery layout in Drupal with Views and CCK

I am creating a gallery/albums site in Drupal 6. Perhaps the description will be a bit detailed, but still on some reason it's a problem to create a gallery in Drupal in a simple way. As for now I am using CCK + Views + FileField + ImageCache + Lightbox2 combination. This has allowed me to - create Album CCK node type that can hold mul...

Drupal CCK Field Level Visibility

Hi, I am using the Drupal 6 module Content Profile to allow using a CCK defined type as a user profile which is working well. The issue I have is that I want the first completion of the profile to trigger an action however the user may save the profile without completing it. My thoughts on this is to have a checkbox by the save button...

how to configure the formatting of file upload in drupal 6

When you use the file import in drupal 6 it adds a whole lot of formatting. How do I just get is to return the path. I am printing the following. <?php print $node->field_factsheet[0]['view'] ?> ...

Stop a custom submit button from firing the form validation on a CCK form

I've added a submit button inside a fieldgroup on a CCK form using hook_form_alter as follows: function mymodule_form_alter(&$form, $form_state, $form_id) { if ($form_id == 'object_node_form') { $form['group_wikipedia']['search'] = array( '#type' => 'submit', '#value' => t('Search Wikipedia'), '#name' => 'searchwiki', '#subm...

Drupal: route nodes links to a view

Getting started with Drupal (specifically CCK and Views), so forgive me if this is a basic question. I'm have some fairly complicated Views that display some Custom Content types with an Attachment below so that I'm essentially seeing multiple tables joined together in one view. Let's say these pages are accessible via /person/64, wher...