In contrast to the standalone mode, the legacy mode utilizes both the Fiona Connector and the Fiona 7 gem. Here, the Fiona Connector takes the leading role, and the Fiona 7 gem has a subordinate role.
Accordingly, the object models are still derived from
RailsConnector::BasicObj, and the
CmsController is derived from
RailsConnector::DefaultCmsController. Furthermore, the routes
/:permalink are handled by the Fiona Connector.
Adding the Fiona 7 gem in legacy mode to an existing Rails Connector or Fiona Connector application initially doesn't change the behavior of the application, allowing you to step-by-step migrate it to Fiona 7. This lets you benefit from Fiona 7 technology and gradually replace edit markers with in-place editing, for example. Additionally, the existing object classes and attributes can be edited and applied using the new technology.
Using the Fiona Connector requires all attributes and object classes to be defined in CMS Fiona, and the attributes need to be assigned to the object classes. This can be done either in advance by the system administrator or, when using Infopark Reactor, by means of migrations. With Fiona 7, this in no longer required.
Attributes of object or widget models are defined within an
in_place block in the model. Once a missing attribute is stored, it is created automatically and assigned to the object class concerned. Analogously, missing object classes are created once the first instance of it is created.
in_place do attribute :title, :string attribute :widgets, :widgetlist end
In a pure Rails application, models can have equally named attributes, even if their type is different. With Fiona 7, this is not possible since all attributes, which are defined in models of the Rails application, are considered global by Fiona. To prevent naming conflicts and preserve the origin of the attribute it is recommended to prefix every attribute name with the name of the model to which it belongs:
class ModelOne < Obj in_place do attribute :model_one_headline, :string end end
class ModelTwo < Obj in_place do attribute :model_two_headline, :html end end
Obj.where(:title, :starts_with, "News")
suppress_exportcan be directly used by the application.
fiona7_tag_listare available in legacy mode.
In contrast to the legacy mode, the standalone mode is biased towards the Fiona 7 gem. Accordingly, object models are derived from
Scrivito::BasicObj. Most functions provided by the Fiona Connector are disabled.
suppress_exportare not available within the application and can no longer be made available through object models.
Obj.where(:objClass, :equals, "publication").and(:title, :starts_with, "News")