- "Ask the Expert" or Advice Column
- "Must Have" Modules
- A Challenge
- Books Overview
- Changing Garland - A Practical Example
- Comparison of Links and Web Links modules
- Create Simple Tables
- Creating a "Biographies" page
- Developing a Module on a Windows System
- Generic Table Display
- How to page a custom DB query
- List Users From a Single Role in a Block
- My Modules
- Announcements: Special Notices for Your Site
- Attendance Matrix
- Content Type Template
- FAQ_Ask
- Get Content Type
- Glossary
- Gotcha - Contact Spam Catcher
- Helpers
- Indexpage: summary of node type information
- Longer Node Titles
- Node Type Filter
- Quotes
- RealName: Using Profile fields to set a user's displayed name
- Register_Country
- Site Documentation Module
- Site Notes: Hidden Design or How To notes in Your Database
- Spam Tokens
- Spam Tune
- Taxonomy Browser
- Taxonomy Delegate
- Taxonomy Image: Associate Images with Taxonomy Terms
- Taxonomy List: Displaying Lists of Terms
- SBS Web Site Notes
- Searching for a New Hosting Company
- Taxonomy Tidbits
- Theming a Specific Content Type
Get Content Type
Submitted on Fri, 11/02/2007 - 03:34.
The get_content_type moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. fills an oversight by the D5 developers. When they moved the part of CCKContent Construction Kit - a Drupal module that allows you to create new content types (sometimes called CCKContent Construction Kit - a Drupal module that allows you to create new content types-Lite) into core for creating new content types, they forgot the analog to taxonomy/term/xxx, that is node/type/xxx. This simple moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. provides that function.
It may be invoked with "node/type/content-type/teaser/number-per-page" or "node_get_by_type(content-type, teaser, number-per-page)" where: content-type is the (internal) name of the type; teaser is TRUE or FALSE to show in teaser format (TRUE is default); and number-per-page is the number of nodes to show per page (default is the same as the post settings). The "sticky" attribute is honored (as is sticky-encoded weighting).
For example: assume that post settings is at the default of 10 per page, "http://mysite.com/node/type/story" will show all the "story" type nodes as teasers with 10 per page. "http://mysite.com/node/type/ed-classified/FALSE/5" will show 5 classified ads per page as full nodes.
Yes, this probably can be done with Views, but not every siteA logically grouped set of content - also web site. has Views installed, nor needs it. Certainly this moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. would have less overhead.



Recent comments
1 week 5 days ago
6 weeks 4 days ago
6 weeks 4 days ago
7 weeks 2 days ago
7 weeks 3 days ago
8 weeks 4 days ago
8 weeks 5 days ago
9 weeks 1 day ago
9 weeks 3 days ago
9 weeks 3 days ago