Creating and using custom content tables If I want to create fields that get set to a custom content table rather than craft_content how would I do that?
Okie doke. After bashing my head against the wall THIS is how you create your very own super deluxe content table. Allow me to explain...

In your element class you will need to specify the following:

  public function hasContent()
  {
    return true; // You definitely will need this
  }

  public function hasTitles()
  {
    return true; // This is optional
  }

  public function isLocalized()
  {

    return false; // This is optional

  }

  public function getContentTableForElementsQuery(ElementCriteriaModel $criteria){

    return "custom_content_table_name"; // You definitely will need this

  }

  public function getFieldsForElementsQuery(ElementCriteriaModel $criteria)
  {

      // NOTE: I do not have any custom fields set to this table. If you have custom fields you should return them here so that they are included in the criteria query. If you also do not have custom fields just do what I'm doing here and return an empty array. 

       $fields = array();

       return $fields;

  }


In your element's model class you'll need to do the following:

  public function getContentTable(){

    return "custom_content_table_name"; // you will need this

  }

  public function getFieldContext()
  {

    return 'custom_content_table_name'; // I have NO idea what this is and the Craft documentation is not clear about it.

  }


Finally, your record for the content table will have to make the following columns:


elementId
title
locale


That's basically it. If you run into any errors make sure you're not including extra non-existent fields in the criteria queries when querying content. Check the Craft logs to see exactly what's happening if you encounter any problems.