Giter Club home page Giter Club logo

field_general.ee_addon's Introduction

Field General Addon for ExpressionEngine 1.x

Field General lets you assign multiple field groups to any weblog/channel. This lets you reuse and share sets of fields, rather than having to duplicate them for each channel. Gypsy has been a popular solution to this problem, but in my experience can become difficult to manage and control the order of your fields. With Field General, you an also share field groups across multiple MSM sites†.

Usage

I use Field General to break my fields into logical field groups that will be reused between channels (e.g. SEO/Meta Fields, Page Body Fields). In certain instances, you may want to create a field group to contain just a single field such as Alternate Title or Page Body. Field General lets you assign as many field groups to a channel as you like, so go for it.

Credit

Thanks to @kswedberg's for rockin' the drag 'n drop!

EE2?

While the publish form in EE2 is much more easily customized, the same problem exists in that you can only select from fields in the single field group assigned to that channel. Enter Field General...except the hook we use publish_form_field_query doesn't exist in EE2 as of yet. So it seems I'll need to rework things a bit. Looks like it should still be possible, however...Field General is far from a perfect solution, and we with any luck we may have better solutions on the horizon.

† Using Fields across MSM sites

While Field General has no problem assigning custom weblog fields and displaying them across MSM sites in the control panel, unfortunately the weblog module has a bit of trouble with this. While its query gets all fields from all sites, when it parses the custom field tags, it only parses those from the site matching that of the entry it is displaying. Until I can find a better solution, there is a small hack to mod.weblog.php that will allow this.

Around line 4512 in mod.weblog.php (ExpressionEngine 1.6.9), look for:

  /** ----------------------------------------
  /**  parse custom weblog fields
  /** ----------------------------------------*/

and immediately after add:

  // This is so we can share fields between sites (via Field General)
  // Start of hack
  foreach ($this->cfields as $site_id => $cfields) {
    foreach ($cfields as $field_name => $field_id) {
      if ($field_name == $val) {
        $row['site_id'] = $site_id;
      }
    }
  }
  // end of hack

field_general.ee_addon's People

Contributors

timkelty avatar

Stargazers

Jay Fienberg avatar Ray Brown avatar  avatar

Watchers

Karl Swedberg avatar  avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.