Drupal 7 Node inside of node in a form - drupal

I am trying to do something like this:
Project: Name, Due Date
Milestone: Due Date, Project
Task: Milestone, Title, Priority...etc
Is it possible to create a project with milestones and tasks all in one form and create all the nodes at once?

in this case drupal work with this as 1 node... you can create one node with multiple form..
use CCK with field group to group your node forms... you can create
Group for milestone form
Group for Task form
ALL of this is regarded as one node.. but i don't think u can insert more than one node in the same form

Related

Showing count of content based on the select list values Drupal 7

I have a requirement in which I need to show some content along with its count based on values in a select list. I wanted to display the allocated,released and resigned resources of a particular department in a selected date range. Using views, date range and department fields are created as exposed filters.
Created a content type for creating resources. The Resources content type is having action as a select list with values allocated,released,resigned. Department is another select list and date field is also added.
Please help me with an answer if views module is not enough. Provide some other solutions also. I'm using Drupal 7.
I figured out how to show node count in views. In my view I’ve some exposed filters and passed my select list cck field as contextual filter. If no result available I made the view to display summary as row count. In the template file, I’m planning to do some calculations for showing the resources count in and out of the project. Please correct me if there is anything wrong in this approach.

Alfresco. How to show the form field by condition?

Good afternoon. There is a business process with many tasks. In one of the tasks there are two association fields (for simplicity, let's call their field 1 and field 2). As when opening this task, check the value in field 1 and, depending on its value, hide or show field 2?
You can copy the OOTB free marker (.ftl) file for your control. e.g. selectone.ftl located at
alfresco-home\tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\form\controls
then add JavaScript code to it to show/hide your fields.

How to print Activiti workflow task's values into Alfresco Share

I have a workflow to manage employee petitions, that starts with some fields at starter form. The next task, allows a responsable user to approve or reject the initiator user's petition.
I want to show the values of starting form into the approve/reject form, so I created a custom .ftl file for every field that I want print the label and the value. Now I have hard-coded the values to the this:
My problem here, is how to get the value from the first form and print it at the second form (values that I need are where says "200€" and my name).
I'm using Alfresco Community 5.1 and his own Activiti.
Thanks.
Solution 1 : keep IDs of the fields identical in both the forms. this will make the field editable in the second form.
Solution 2 : create a process variable, set its value after the first form has been submitted. then, in the second form display the value of the process variable.

How do I create a page that shows two specific nodes?

We want to create a page that shows two specific nodes.
The first node will be localized content (an article node in the user's language). There will be at least 5 different language versions of that page.
The second node will be a Webform node that the user can submit to "sign" the document. It will be language neutral.
Originally I figured that I could have one Webform node and then translate it into the appropriate languages. But what I discovered was that the "translated" version of the Webform node was, in fact, a completely new node--which means a completely new webform. This makes sense if you think about how Drupal handles multilingual content--each translation is a separate node.
But in the case of our webform, we don't want to split the submissions into 10+ different webform submission sets. Everybody who "signs" has their signatures placed into the same "bin" of data.
I can think of two possible solutions:
Create a page that will display two nodes: the localized version of an "article" node (selected depending on the user's language selection), and the webform.
Create multiple Webform nodes (one per language), and then create a MySQL view that merges all the user submissions into a single set of records. This would allow us to extract our data without a great deal of headache.
I'm not sure if 2 is possible. I'm assuming that I'll have to go with 1. But, so far my efforts to accomplish this have also been fruitless! How can I do this?
-Josh
I think 1 is much easy and possible solution. You can create webform node and make body field as php code (for that you need to enable php filter). And put in body follow lines:
<?php
$nid = NODE_ID;
$node = node_load($nid);
$node_view = node_view($node, 'full');
print drupal_render($node_view);
?>
Just replace NODE_ID with nid of multilanguage node.

How do I get Group ID as context in Views Drupal 7 without Panels

I have been banging my head all day with this. I have seen other posts, but they all seem to say "Use Panels" and I dont want to make a panel page for every view.
I am using Drupal 7.x, Organic Groups with Group Context, and Views.
I created a content type as a Group, and several content types as Group content types.
In my view, I added the relationships Group Membership:Node group membership, Group: Node, and Content:Author. I have tried various Contextual filters, but none seem to be working.
The view is display type page, with a path of node/%/content/documents (documents is the content type where I want to show all uploaded documents for a particular group).
What is see is whenever I add a contextual filter, the query contains a line similar to WHERE ((og_node.gid = 'xx')) and the value there is the value of the group node entity ID, and not the GID. I have set the default value on the contextual filter to "current OG Group from context" and I have set the validation criteria to validate on the Content ->group content type, and Node ID. I can get the Page Display title to use the %1 placeholder to accurately grab the Group Node title successfully, but I cant get context to be passed in so the WHERE clause contains the GID and not the entity id.
Any help?
I just tried this and the following two settings worked for me:
Relationship of Group membership: Node group membership
Contextual filter of (group membership) OG membership: Group gid
In the preview window, when I enter in the gid for the contextual filter, I get back exactly the nodes belonging to that group that I expect.
Have you tried that one yet?
You can try the og_context module (part of og)

Resources