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
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 ...
5
votes
2answers
2k views

Replace summary/description with another field in Views RSS output

I have a view for an RSS feed which uses the node output (only option it seems when RSS style is selected) so I cant choose custom fields. But, as the body field is 'text and summary' the RSS view ...
1
vote
1answer
732 views

File/image upload via CCK and Nginx + FastCGI

I am using the ImageField module with Pressflow, Nginx, and FastCGI. When I go to add a file via the standard ImageField CCK upload widget on a node, the Upload "throbber" does its thing, Drupal does ...
5
votes
2answers
1k views

Cache field / entity / node

I have a custom field/widget that has a format view function that is highly resource intensive. I currently am caching the result using cache_set()/cache_get() inside the hook_field_formatter_view ...
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
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
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
874 views

Image field theming

In Drupal 6 Views, there was an option to display the path of that file for an image type field, which is not present in Drupal 7. Where is it?
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?
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 ...
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 ...
3
votes
3answers
2k views

How do I edit a complex entity via dynamically loaded AJAX-forms?

I have a "profile" entity with a field "education" (to get started). That field contains various input fields that describe the "education". At the moment I have "institution" and "year". I created ...
14
votes
5answers
2k views

Entities in Drupal 7

What are Drupal Entities in Drupal 7? I understand that Drupal Commerce built Products as an Entity. I know now there is a core Entity API and an contrib add on for Entity API. I have a few projects ...
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
1k views

Using CCK Date with Date Repeat on Calendar

I have a content type named Event. It has a field name Date, which uses the jQuery pop-up with Repeat options. It uses the To and From date, both of which are required. The time zone conversion ...
2
votes
4answers
1k views

Entity API and Contrib Modules

When using the Entity API, is it fairly simple to interact with Taxonomy, Path/Pathauto, XML Sitemap, and Views? If so, what parts of the API should I be looking at?
5
votes
3answers
696 views

Change $<field_name>_rendered output?

In a node I get the values of CCK fields as $ array or $_rendered as the rendered view of the field. How can I change the $<field_name>_rendered from its default way of rendering?
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>&...
14
votes
4answers
6k views

Limit Teaser to display only the first value of a Field

I have a Content Type with an Image Field. This field will typically be populated with 0 to 4 values. By default the teaser for this Content Type outputs all 0 to 4 images. How can I adjust the Teaser ...
4
votes
5answers
2k views

CCK Field with two values?

Is there a way to have a CCK Field have two values for one input? For example, a field called 'Sodium' and two values, '190mg' and '8%'- first being the amount, second being % of daily value. If not,...
3
votes
3answers
897 views

Does it make sense to develop a fantasy sports management system by creating or extending entities?

I am considering building a fantasy sports management system with Drupal. The system will need content, so that's taken care of with the standard Drupal system. However, does it make sense (or even ...
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-...
20
votes
9answers
13k views

How to implement two way node references?

The node-reference module (a component of CCK) provides a great way to create a reference one node from another. What is the best way to expose a two-way relationship between the two? Example below: ...
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 ...
2
votes
1answer
103 views

Making responses to public nodes only viewable by the creator and the originator

I've got a prototype site built in D6, pertinent modules: CCK Comment block Node Comment Views Views Or The site is built around a list of open requests; to solicit a private response. These nodes ...
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 ...
5
votes
5answers
2k views

How to display cck node fields' values at the search result page?

I need to display some specific cck fields such as Telephone Number, Address, etc. at the search result page. As I see the search-result.tpl.php, there is no $node->... So how can I get the node ...
3
votes
2answers
3k views

How do I create my own tokens?

I use the Rules module. I want to add 1 to a CCK integer field on an action. Someone told me to create a custom token doing this addition. So, I installed the tokenSTARTER module. Now, how do I ...