Infopark Rails Connector

Infopark Rails Connector integrates Infopark’s CMS into your Rails application.

It connects either to Infopark Cloud Express CMS via infopark_cloud_connector or to Infopark CMS Fiona via infopark_fiona_connector. It also enables you to integrate various ready-to-run features.

For more information about Infopark Rails Connector, please visit Infopark’s Knowledge Base.

Configuration

Here is how the available addons can be enabled in the rails_connector.rb initializer file of your application:

RailsConnector::Configuration.enable(
  :google_analytics,
  :infopark_tracking,
  :crm,
  :pdf_generator,
  :rss,
  :search,
  :seo_sitemap,
  :time_machine
)

Layout Helpers

Some of these functions require HTML or Javascript code to be included in the application layout. For example, Google Analytics only tracks pageviews if their JavaScript snippet is included at the bottom of the HTML body.

The Rails Connector provides two helpers for managing this kind of layout code, switching on or off parts depending on whether features are enabled or not:

rails_connector_header_tags

This helper needs to be called inside the HTML head tag.


This helper needs to be placed right before the closing body tag.

Generators

Infopark Rails Connector comes with three generators to help you get up and running quickly:

> rails generate rails_connector:install

Adds to your application the Time Machine assets, a rails_connector.rb initializer and rake tasks specific to the gem.

Seo Sitemap

The default implementation of the SEO sitemap will reference all the files from your CMS in the generated sitemap.xml. For a large number of files, this can slow down your server. Please refer to RailsConnector::SEO::ClassMethods#find_all_for_sitemap for advice on optimization.