/[drupal]/contributions/modules/auto_nodetitle/README.txt
ViewVC logotype

Diff of /contributions/modules/auto_nodetitle/README.txt

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.7 by fago, Mon Nov 5 15:26:07 2007 UTC revision 1.8 by fago, Mon Nov 5 15:31:30 2007 UTC
# Line 1  Line 1 
1  $Id: README.txt,v 1.6 2007/10/30 11:17:38 fago Exp $  $Id$
2    
 Automatic Nodetitle Module  
 ------------------------  
 by Wolfgang Ziegler, nuppla@zites.net  
   
   
 Description  
 -----------  
 This is a small and efficent module that allows hiding of the content title field. To prevent  
 empty content title fields it sets the title to the content type name or to an configurable  
 string. If the token module is installled it's possible to use various content data for the  
 autogenerated title - e.g. use the text of a CCK field.  
   
 Advanced users can also provide some PHP code, that is used for automatically generating an  
 appropriate title.  
   
 Installation  
 ------------  
  * (optional) Download and install the token module.  
  * Copy the module's directory to your modules directory and activate the module.  
  * For each content type you want to have an automatic title, click on the  
    "edit" link for it on 'admin/content/types'  
  * At the top of the content type edit form, there is a "Automatic title  
    generation" box allowing you to configure the details for the current content  
    type.  
   
   
   
  Advanced Use: Combining tokens and PHP  
  ---------------------------------------  
   
  You can combine php evalution with the token module, because tokens are replaced first.  
  Here is an example:  
   
 <?php  
   $token = '[field_testtext-raw]';  
   if (empty($token)) {  
     return '[type]';  
   }  
   else {  
     return $token;  
   }  
 ?>  
   
  So if the text of the CCK textfield [field_testtext-raw] isn't empty it will be used as title.  
  Otherwise the node type will be used.  
3    Check out the branches to get the code.. :)

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.3