July 21, 2010
Embedded cck add forms
I've scene remarkably little on embedding a node add form within another but I've been looking into it using Panels to accomplish this. There is a way to have to different node add forms on the same page but the trick is that the lower form is the one that is actually created when you hit submit.
Another problem is that you cannot add specific fields, only the entire form. This issue is supposedly the working are for this feature but you'll notice the comment indicates it is frozen.
Also, here's a relevant comment from MerlinOfChaos.
Below here are old notes:
I haven't reached a conclusion on this topic but here is what I've found thus far:
Put the form in a block and have it show up on specific nodes: http://drupal.org/node/152924
Embedded CCK node form in collapsible fieldset: http://thedrupalblog.com/embedded-cck-node-form-collapsible-fieldset
Subform element module: http://drupal.org/project/subform_element and documentation: http://drupal.org/node/133725 and
A post "Creating a custom link to prepopulate the Create content form": http://drupal.org/node/416276
Custom content type which contains a list of another content type: http://drupal.org/node/161257
The whitehouse.gov module, node embed: http://drupal.org/project/node_embed
Multiple nodes from single node submission in Drupal: http://www.advomatic.com/blogs/jonathan-delaigle/multiple-nodes-single-node-submission
Nested fieldgroup's in CCK, not too relevant but this is the longest forum I've seen on drupal.org thus far: http://drupal.org/node/300084
Embedding CCK content type create form in your page: http://drupal.org/node/464906
I got several leads from here:
Hide exposed search filter
I've figured out how to place a search filter into a Panels template but now I want to hide it when the view doesn't appear. When you expose the filter it appears as a block so I'm assuming the correct PHP snippet in the block configuration would hide it. Here's what I've found thus far:
Tiny snippet here.
This post uses views validation stuff.
MerlinOfChaos makes a point here that the filter is built before the view content is populated. Does this mean it's not possible to hide the exposed filter if the view is empty?
July 19, 2010
Force file download of csv's
One option is the Drupal module:
Another may be outlined here (find htaccess or mwinter parts):
July 15, 2010
Panels + Views with Filters (search bar)
Now that I have all of the publications for a Research Site appearing on a given research site's page, I need to add a search bar. Ideally, after searching, the user would remain on the research site page and the view would present only the search results. I haven't gotten this to work yet but this forum seems to have some good suggestions.
OK, now have it working. Here are some of the essential steps.
Display Type - Content Pane
Arguments - Node:Nid
Filters: Search - Search Terms (exposed, optional)
Basic Settings - Exposed form in block: Yes
Pane Settings -
- Use Panel Path: Yes
- Argument input: "Node: Nid Source: From Context", "Required context: Node ID"
- Allow settings: Path Override
- Place the "Exposed form in block" Search Filter in one region (default settings)
- Place the Content Pane into a DIFFERENT region ("Node: NID: Node being viewed" and "Override path: node/%"
Panels + Views with Arguments
I've found that passing arguments from Panels to Views via the Default or Page view type to be very simple. Passing the same arguments to a Content Panel is not nearly as easy though. Here's what I've figured out:
This comment is a solution although it bypasses Panels arguments altogether so it's a bit of a workaround.
Settings for Views:
Arguments > Node:NID (No Relationships, Hide View if no Argument)
Pane Settings > Argument Input
- Node:NID Source > From Context
- Required Context > Node ID
Settings for Panels:
Add the Content Pane to the Panel (Add Content > Views Panes)
Settings > Node: Node ID > Node Being Viewed
Note that I'm working with the Node Template panel which means a context is predefined. If you're working with a different panel you may need to define a context.