Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

Let's say on my "contact" page, I want to use a google map (module), contact form (webform module), show our address (node using Address field), and list some social icons. Let's say stacked on top of each other in the "content" region.

What is the easiest way to do that?

Note: this similar question involves code, I want to avoid that:

How do I create multiple nodes on the same page?

share|improve this question

3 Answers 3

I came to a similar situation of your question before. I need a page, divided to two parts. On left shows company info such as Google map, company address, phone number etc. On the right side, shows a "Webform-ed" Contact Us form. The single page is actually a Panel node of a combination of two other nodes.

My solution is use Panel modules.

Enable modules:

enter image description here

Create a Panel Node, pick a layout of the Panel node. enter image description here

enter image description here

Add content to each place. enter image description here

Select existing node you created. (e.g Company info node & Contact us node) enter image description here

share|improve this answer

use the display suite module and make blocks for each item. put the blocks into a custom view mode. you could also use like either entity_view_modes or view_mode_page to create the custom 'view modes' for your content.

In general, its neat to be able to do all this with an administrative UI (Views UI, DS interface, Field UI view modes); but all of these modules can have a steep learning curve by themselves -- let alone working together. Also, these are not small modules depending on your host environment.

Doing a custom page with hook_page_build or hook_page_alter and making blocks in code or with the views_ui can be much leaner.

To each his own.

share|improve this answer
    
so, if I did want to do it in code, I'd make my own module, called say "neils-contact-page" and use those hooks to set it up? thx –  Neil McGuigan Nov 10 '12 at 6:13
    
I love to use display suite with Entity Reference, especially when I need to limit the results of the nodes referenced. drupal.stackexchange.com/questions/44337/… –  cayerdis Nov 10 '12 at 22:35

Use Entity Reference module at http://drupal.org/project/entityreference .

Create a new content type called "Contact Page" or whatever you want to call it. Add a field called "Embedded Nodes" of type Entity Reference with the autocomplete widget. In the field configuration, designate which nodes the field can reference in target bundles and set number of values to unlimited. After save, go to manage display and for the format of the "Embedded Nodes" field, choose "Rendered Entity". You can also choose which view mode to use - Full Content is fine. So now when you create a content type, you can reference other nodes to be displayed within the node. You can embed and re-order nodes at will without views.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.