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
There are no settings for this module.
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 or FALSE to show in teaser format (TRUE is default). This is case-insensitive, and in actuality, anything other than "false" 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).
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/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.
