Questions tagged [entities]

Nodes, comments, taxonomy terms, and users, in the terminology used since Drupal 7, are generally called "entities."

Filter by
Sorted by
Tagged with
3
votes
1answer
1k views

Adding a CCK field with Rules

I'm trying to use Rules to populate a CCK field - a user reference when they flag a node. It basically works, but if there's already a user reference it overwrites it instead of adding another. That'...
2
votes
2answers
239 views

CCK fields don't appear on the “node add” form for authorized user

I would like to allow logged-in users to create nodes, and I gave them the permission to create "some_content," but on "add node form" users have only one field, which is for custom node title, ...
3
votes
2answers
436 views

Two columns on frontpage with a CCK form and a node list

I want to show a simple frontpage that contains a content creation form (cck) on the left side and a list of nodes on the right side. With a head and a footer, the page looks like this: I have ...
7
votes
2answers
916 views

Creating N fields with N 'subfields'

I'd like to create a content type "Enterprise" where user can define N services and, for every service, N tasks. I have already created the other fields for this content-type (name, description, ..., ...
4
votes
2answers
435 views

Image upload & gallery

Is there a way to limit the number of imagefield fields present in a node? I am using iTweak Upload, which allows to upload an unlimited number of images, but I need something that can limit the ...
3
votes
2answers
644 views

How to create an unsortable Field with multiple values?

When a CCK field accepts more than one value, the widget will display a sortable table (usually with those cross-shaped handlers); this is the default behavior. I would rather have a non-sortable ...
3
votes
2answers
216 views

What are the potential security issues when importing an entity type?

I'm working on a module. If the module is enabled, there would be an overview page showing the field structure of different content types. The visitor could then click a button to get a copy of the ...
4
votes
1answer
2k views

Change field options after form has been filled with data

When creating my form, I wasn't enough aware of the configuration for the default core description field. I don't want a summary field, but I did not pay much attention at that when setting my form ...
4
votes
1answer
730 views

How to alter the Views field Format drop-down menu

I am exporting some XML feeds using Views. One of these fields needs to look like this: <image>http://example.com/path/to/myimage.jpg</image> I am storing my image in a CCK field. When ...
1
vote
1answer
1k views

Sending mail to an adress specified in a node creation form with an CCK email field with Rules

I'm using a node creation form open to anonymous users to register volunteers for an event, and I want to redirect them to a thank you page, and send them an email when they register. I'm using Rules ...
1
vote
1answer
1k views

Multiple primary keys

I have defined a new content type, statetype and a CCK field, state. I need to use the CCK field as primary key in this table because I have another table and I need use that field as foreign key. (...
1
vote
1answer
4k views

Adding Node-Fields to query with db_select();

I am building a query using db_select(); Now I need to sort my result by a field that a added using fields. Is there some nicer way than to join field_data_field_fieldname, and revision? I was ...
3
votes
1answer
225 views

Field api - taking responsibility over a field display

I am writing a Drupal module that deals with the taxonomy terms, which are (as I understand) fields, taxonomy vocabulary , which are as I understand entities. My module should take over the taxonomy ...
3
votes
2answers
2k views

What format are CCK dates stored in?

In what format are CCK dates stored? If it stores dates in the database using a timestamp string instead of a native MySQL datetime format, what implications does that have in regards to storing dates ...
5
votes
1answer
708 views

Remove “required” status from the Date field

I have a field that is currently marked as required. However, I want this to be required for all roles but the Admin. I've made a module that implements hook_form_alter(), and I have been able to ...
3
votes
1answer
173 views

Filtering CCK views by path

I've created a View in Drupal 6 which I am using to display a list of events. I would like to be able to filter the view by year via the path like this: http://www.mysite.com/events -> gives me ...
2
votes
3answers
151 views

Best practice to have a 'category' fields where admin can choose wich voices the user can choose

I have a content type that needs a 'category' field; this can both be a taxonomy vocabulary or a text field (with the select widget), it doesn't really matter. (I won't have more then 5-6 voices at ...
2
votes
1answer
265 views

CCK field value count is never less than 1

I have got a CCK field set up so that unlimited values can be entered upon node creation (number of values: unlimited). When I try to print values in a node with the following code if ($node->...
2
votes
1answer
107 views

How should I use a field in views?

I have a CCK field that I want to use in a view. How can I do it?
2
votes
1answer
924 views

Where can I find the save destination path for a filefield? (via code)

I have an image file field and I am attempting to write a little script that will programmatically scan my nodes and save images found in the body of my node into an image file field entitled ...
3
votes
1answer
598 views

How to create a view to display a block of referenced nodes?

I have a node type, called "policy", that has a bunch of CCK fields, including a Node Reference type. This is configured to reference an unlimited number of nodes. When the nodes are viewed, the ...
2
votes
1answer
275 views

cck Nodereference for files

I am trying to create a node that has a single file attachment (using CCK filefield), and be able to reference that file by other nodes (possibly more than one node). The application is such that ...
8
votes
4answers
7k views

Customising the first item in a view

As a block on my homepage I'm trying to output: <ul> <li><a><img><p>Node 1</p></a></li> <li><a>Node 2</a></li> <li>&...
1
vote
3answers
919 views

Customising field container

I've created a cck field formatter. The field outputs uploads from filefield into embedded iframes that link to google docs for display. It currently outputs: <div class="field field-type-...
9
votes
5answers
751 views

How might I create a “step-by-step process” content type?

I'm thinking about creating a process manual for an intranet. Most (all?) of the processes have a very clear order, although the actual order may change from time to time. The plan is to have the ...
6
votes
2answers
440 views

Field API versus custom code

If I need to add custom fields only to user profiles, is it better to create a module that uses the field API, or a module that uses its own code to show the custom fields at a custom URL and to save ...
5
votes
1answer
4k views

How to create relationships between Taxonomy vocabularies?

I'm trying to build a site with similar content conventions to Craigslist. The problem is, I don't really know a good way to create multiple vocabulary relationships in drupal. Here's the end result I ...