1

I have a client who wants to allow some editorial staff to create and edit 'main pages' on their site. These are things like 'about us', 'our clients', 'breaking news' and so on; they want these 'main pages' to follow a house style (one main image, relevant links here, block quote there, content in the middle, etc.)

The site is built with Drupal 7.

I'm thinking that the way to go is probably using a custom content type, 'main_article' and then using views to display various fields from that content type in the relevant blocks - so, for example, having a 'main content' block that sits in the content region and displays the title and main content, 'picture' and 'links' blocks that both go in the left column, and 'citation' and 'blah' blocks over in the right column.

I guess I would use the 'Content: NID' contextual filter to make sure that I only get content from the relevant 'main_article'.

  1. This seems like a standard enough design issue: Am I going about it in the right way?
    Is there a better solution? (I've seen similar questions here and elsewhere that led me to follow this way of doing it.)

  2. How would I go about getting the 'main_article' content type to put a link in the main navigation menu?
    Using the menu option in the content creation page would link to the default content, not the view (if you see what I mean). Could it be done using a field?

  3. If the user creates a URL Path for the content they create using this content type, that's going to break the 'content: NID' contextual filter. Is there a way of 'contextual filtering' on the URL (which should then work for standard node URLs and for 'nice' URL paths)?

  • I've also stumbled into Display Suite as a potential answer... – Charlie King Feb 23 '12 at 15:52
  • OK, sorry if this isn't the right way to wrap this up, but... I managed to do what I wanted using Display Suite Like Panels, it appears to be limited to displaying content in a re-divided-up main content region, but it also has a killer feature hidden in its 'extras' that allows you to expose fields of a node within a block, which can then be placed in wherever you want. Paths and Menus behave as expected. I also came across Block Theme which allows me to theme specific blocks separately FTW! Thanks everyone. – Charlie King Feb 26 '12 at 9:12
1

An simple solution is to use the Panels module and Page Manager from ctools module to override the default node page for your content type. That way you also do not have to worry about menus, sitemaps etc.

The downside is that you cannot easily use the blocks defined in the template to position parts of the nodes content.

  • Thanks Martin - I've noticed the Panels module but haven't tried it yet (thus far, I've managed with blocks and views). I'll have a play and report back here :) (btw, I don't yet have the reputation for voting up) – Charlie King Feb 22 '12 at 9:30
  • So far, panels looks almost ideal: I see what you mean about the downside, though. The panels layout seems to be limited to choosing one the default set of layouts, regardless of your theme regions - is that right, or can those layouts be overridden in the theme? – Charlie King Feb 23 '12 at 15:38
  • That is right Charlie, but mostly you will not notice the difference. Alternatively there are a lot of possibilities and modules around panels (mini-panels, panels everywhere...) but I am not familiar with it and it seems like an overkill for your initial question. – Martin Feb 24 '12 at 11:48
  • @CharlieKing You are definitely not limited to the layout's that come with Panels by default, they are just there to demo how you can create your own ones. – Letharion Apr 22 '12 at 8:13
0

If the display needs are pretty simple, then you can enable the CCK Blocks module.

Then if you got to 'Manage fields' for a particular CCK field, you can specify 'Provide block for this field', and, sure enough, you'll get a new block which you can include on the relevant pages.

  • Thanks Quentin, I've not got round to looking at CCK Blocks: I'll have a play, and report back here. :) (btw, I don't yet have the reputation for voting up) – Charlie King Feb 22 '12 at 9:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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