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.

I have a content-type, that can be structured like this:

  • content-type A

    • title
    • summary


    • part one title

    • image
    • text


    • part two title

    • image
    • image
    • image
    • text
    • image


    • part three title

    • text
    • image
    • text

I have no control about the position and the amount of elements that can occur. I just have the types, like heading, text, image. Actually i have only fields or rather field-groups.

How can i give the editors the possibilty to move these fields or field groups inside the content type so they can determine the position? Is there something like nodequeue for fields?

Or should i alternatively cut the content-type to smaller pieces and organize it with nodequeue? I haven't worked with nodequeue before, is it possible to give a queue a menu-entry for example?

edit: Just before i asked my question i was watching a tutorial of Display Suite and if i understood correctly i can change the layout of a content-type globally. I'm looking for a solution that gives more control over each "article" created with a content-type. Maybe i was unprecise in my question...?

share|improve this question
    
i don't have a complete answer yet but have you reviewed hook_form_alter –  austin Nov 23 '12 at 17:38

4 Answers 4

up vote 2 down vote accepted
+50

If I get your question right you want both the number of parts, the combination within the parts and order within the parts to be different. This may be a little difficult to implement but definitely doable.

I am assuming that you are going to have only title, text and image type in each of these parts.

Using fieldset module create three field collections name weighted title(containing textfield with cardinality as one and weight[integer value with cardinality as one]), weighted image(image field and weight field) and weighted text(containing a text field and weight field)

Now create a field set named type, add weighted title, weighted image and weighted text as the fields in this fieldset. Make sure that you keep the cardinality of these fields as infinity. To make sure that it is not confusing, we will need to remove the drag and drop option withing the type fieldset.

The UI needs to be worked on to make it more intuitive. Without these enhancements to implement

part two title

image image image text image

We will have to do it as

Solution : title 1 image 2
image 3 image 4 image 6 text 4

and for

part three title

text image text

Solution : title 1 text 2 text 4 image 3

Hope you are not lost :P

share|improve this answer

If I get it right, you would like to let users set the position of the field-groups when they edit a node.

If that is what you want, then I would add a "position" field to every field group (hide it on the node display, but make it visible on the node edit page).
Then you can use the value of the "position" field in template files (node.tpl.php) to add classes to the field-groups for example. Then use these classes in CSS to position the field-groups.

share|improve this answer
    
Interesting approach, though not too easy to maintain. Imagine there are 8 parts in a node and now we need to add one between 2 and 3. That would mean to change the position value of 3, 4, 5, 6, 7 and 8. –  Volker Nov 30 '12 at 16:30

This sounds like a problem better solved by multiple content types with role and/or user specific permissions. You can easily group content of various types with views, nodequeues, or taxonomy to name a few - any of which can of course be assigned to a menu item.

Otherwise, your best bet if you choose to stick with this is to use Panels as nodes, let editors create panels on the fly, arrange them how they want in predefined layouts, etc - but this is likely a training and maintenance nightmare.

share|improve this answer

With Panelizer you can can allow users to customize the position of a nodes fields and other content. The settings are specific for a node.

You can also setup one or more default variants with fields and other content (blocks etc) placed in regions. Users can then choose one of your default variants to be used for their node.

You can setup what content a user should be able to place in a node.

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.