Create Content in Drupal

cmgui - December 19, 2008 - 00:29

hi All

Drupal is quite unique amongst CMS in that it has a Create Content block containing the links to create contents for the different content types or nodes.

While this may be good to administrators, most users would prefer a Create FAQ, or Create News, or Create Story link at the top of the FAQ (a Drupal module), News (self created content type) or Story page. This is the more common way of creating contents.

Does anybody know how to hack Drupal for this?

Thank you

cmgui

=-=

VeryMisunderstood - December 19, 2008 - 00:33

I don't see why you feel you have to hack drupal for what you are asking.

you can create any kind of page content you want and link to them in the menus. You can also manipulate and create your own menus instead of using the default menus.

hi VeryMisunderstood thank

cmgui - December 19, 2008 - 00:39

hi VeryMisunderstood

thank you for the fast reply

yes, i did that for my News content type.
i created a new content type called News and set it to publish to the front page.
i then created a Menu called News linking to the front page .
then i created a child menu item for Create News -- and made the parent News menu 'expanded'.
however, because News menu is linked to , the child menu item is always exposed even if the News menu item isn't selected.
anyway that is not what i want.
i like to have a "Create News" link at the top of the page containing all the News articles.

likewise for the Frequently Asked Questions module.

some modules, like Blog, already have a Post Blog in the blog page.

=-=

VeryMisunderstood - December 19, 2008 - 00:44

you have two methods to create lists.

first and foremost, core supports taxonomy listing pages. Create a taxonomy for your "content types" associate this taxononmy with the content type and you have lists created by core see: http://drupal.org/handbook/modules/taxonomy

Using categories in menus

The menus on your site can call for items that match specific taxonomy terms--that is, terms you've named your categories. Here's how.

When you create a new term, Drupal assigns it a number. And you can call up all the items categorized under that term by calling for its number.
To see your term's number, go to the categories page, choose list terms for the category to which your term belongs, and now hover over your term's name in the list. You'll see the number.
Now, on the menus page (administer >> site building >> menus) you can create a menu item for your term. Select add item, and when you fill in the path field you add your term like this:
taxonomy/term/1

If the term "sonatas" is term 1, this would call for all the nodes of that category.

If the term "Bach" is term 2, this could call for only those sonatas written by Bach:

taxonomy/term/1,2

Or if Brahms is term 3 and this will call for everything that has to do with either Bach or Brahms:

taxonomy/term/2+3

If you are using a hierarchical taxonomy, and want all notes tagged with child terms to show up also, you can create an URL link like taxonomy/term/2/2 where the second parameter is the depth that the tree will be recursed into, or taxonomy/term/2/all for all child terms.

another more advanced method would be to use the views.module and build your lists.

 
 

Drupal is a registered trademark of Dries Buytaert.