On this page
Get Content Type
The get_content_type module fills an oversight by the D5 developers. When they moved the part of CCK (sometimes called CCK-Lite) into core for creating new content types, they forgot the analog to taxonomy/term/xxx, that is node/type/xxx. This simple module provides that function.
Thanks to milianw this module now supports RSS feeds.
Installation
Normal module installation applies.
Settings
The settings are in the content type admin page (admin/content/node-type/xxx).
You may indicate whether or not to show the content type description as introductory text at the top of the list.
You may also automatically generate a menu item to list the content type, and specify into which menu the item will be placed.
Using the Module
It may be invoked from the URL as "node/type/content-type/teaser/number-per-page" or programmatically as "node_get_by_type(content-type, teaser, number-per-page)" where:
- content-type is the (internal) name of the type. This may be a list of types separated by '+'.
- teaser is "true," "false," or "list" to show in teaser format (true is default), page format, or as a list of titles. This is case-insensitive, and in actuality, anything other than "false" or "list" will be considered to be "true."
- number-per-page is the number of nodes to show per page (default is the same as the post settings).
- sort-order is the way the nodes are listed. 'date' - by sticky and created date (standard Drupal ordering), or 'title' - sorted by title. The default is 'date.'
NOTE: both the teaser and sort-order parameters may also be specified in your site's translation.
If content-type is omitted, a form will be presented to select the parameters and build the proper URL.
The "sticky" attribute is honored (as is sticky-encoded weighting). "Db_rewrite_sql" is used so access control or translation modules should be able to work their magic.
Examples
- Assume that post settings is at the default of 10 per page,
http://example.com/node/type/storywill show all the "story" type nodes as teasers with 10 per page. http://example.com/node/type/story+faqwill show all the "story" or "faq" type nodes as teasers with 10 per page.http://example.com/node/type/ed-classified/FALSE/5will show 5 classified ads per page as full nodes.http://example.com/node/type/story+page/list/10/titlewill show all story and page nodes as a list of titles, 10 per page, and sorted alphabetically by the title.http://example.com/node/typewill display a form for the user to choose parameters.
Nay-Sayers
Yes, this probably can be done with Views, but not every site has Views installed, nor needs it. Certainly this module would have less overhead. End of argument, please.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion