Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Warning
titleWork in Progress

Updating the course for FarCry 6.x. If you can help let us know! Put your notes in the comments for the page.

Section will be expanded to include:

  • discussion of project structure
  • discussion of how to create plugins
  • discussion of skeletons; exporting data, migrating projects and creating installers

Objective

Excerpt

By the end of this unit, we should have an understanding of how FarCry navigates our project and plugins to find both content type metadata and relevant webskin locations.

Plugins

Image Modified

Every aspect of a project can be repackaged and used in another project as a plugin. This might be the entire project or just a small part of it. Most applications are combinations of several plugins. Community plugins include solutions for Google Maps, blogging, content management, free-text search engines and many, many more.

...

  • content types
  • webskins or views
  • webtop configuration
  • publishing rules
  • formtools (components used to render form elements)
  • components (effectively content types without database persistence)

Installing Plugins

If you nominate a plugin during the initial installation of your project, its code and content types should be automatically registered and deployed. However, if you are deploying a plugin to an established project you will need to get your hands just a little bit dirty.

...

Info
titleReloading configuration

You can use updateapp=1 to reload the entire application, or you can log into the webtop and just reload config data:

  1. Admin > Developer Utilities > Reload application > Config Settings (under the Miscellaneous section)
  2. Click Update Application

Walkthrough: Installing Google Maps Plugin

  1. Download the Google Maps Plugin
  2. Copy the code base to the plugins folder of your installation
  3. Update your farcryConstructor.cfm configuration file to include GoogleMaps
  4. Re-initialise the application
  5. Go to the Admin > Developer Utilities > COAPI Tools > Types and deploy the Google Maps content types
  6. Go to the Admin > Developer Utilities > COAPI Tools > Rules and deploy the Google Maps publishing rules
  7. Login to the webtop and update the Config for Google Maps with your API key
  8. Create a publish a Google Map

Plugins & Content Types

Now that we understand the cascading relationship between FarCry Core, Plugins and a Project, the order of initialisation of the metadata for a particular content type is straightforward.

...

Tip
titleScope Dump

If you know the exact structure your are looking for you can type it up the top and click [dump], or browse using the preset scopes listed on the left of the viewer.

Walkthrough: Extending the News Content Type

Using this concept, we are going to extend the dmNews.cfc found in the farcrycms plugin and add some new properties.

  1. Create a new file in projectName/packages/types/dmNews.cfc
  2. Paste the following:
    Code Block
    <cfcomponent
      extends="farcry.plugins.farcrycms.packages.types.dmNews"
      displayname="News"
      hint="Dynamic news data">
    <cfproperty
      name="author" type="string"
      ftSeq="10" ftFieldset="Publishing Details" ftWizardStep="General Details" ftLabel="Author" />
    </cfcomponent>
    
  3. Notice the value of extends: this says we are extending the properties and functionality found in farcry.plugins.farcrycms.packages.types.dmNews
  4. Deploy our new property
  5. Update our COAPI Metadata
  6. Create a new News item in the webtop from "Content / CMS Content / News"
  7. Notice our new author property now located in the correct position in the wizard

Webskin Inheritance

Once all of the types have been initialized in the fashion above, FarCry then finds all the webskins that are relevant for each type.

...

This allows us to override behaviour defined in core or a plugin and so on.

Lab: Override the displayPageFull News Webskin

Go ahead and update the full page display webskin for dmNews to include the new author property.