Start page / Plug-In Development / Examples / Module: Editorial Search and Replace

Chapter “Modules: Accessing Web Services via OData/SOAP” >>

Example Module: Editorial Search and Replace

The FirstSpirit example module Editorial Search and Replace demonstrates use of a report in conjunction with a client service.

The module's functionality set includes searching for text strings and navigating to occurrences in template-based elements as well as select other elements, such as media and template elements. Optionally, a replacement string may be provided which, through user interaction, is inserted in place of one or more search string occurrences.

As a module which covers a real-world use case, it is more complex than the simple examples provided in the ContentCreator examples module. This documentation provides an overview of the module's structure and programmatic units, includes references to other, plug-in-specific parts of this documentation, and explains parts of the module's implementation at times when insight into the code and its data flow is useful.

Important The Editorial Search and Replace module is intended as a code example, demonstrating interactions between user interface plug-ins within the context of a real-world use case. The module is provided as-is with no guarantee of functionality and must not be used in production-level server environments and projects.

Table of Contents

  • Module Structure
    provides an overview of the module's programmatic structure, detailing the four individual functional packages and their respective classes.
  • Compilation, Installation, and Configuration
    details the module-specific provisioning procedure, including compilation and installation of the module itself and installation of the project application into a FirstSpirit project, as well as configuration of this project application and project-specific ContentCreator web applications.
  • Usage
    provides instructions on using the module to perform search and replace operations on project content and templates.

Feature Set

In its provided implementation, Editorial Search and Replace supports the following functionality:

  • Integration in both ContentCreator and SiteArchitect
  • A search and replace report
    • The ContentCreator report supports processing of
      • Web pages (Page and Section elements combined)
      • Datasets
      • Media elements
    • The SiteArchitect report supports processing of
      • Page and Section elements (listed individually in a combined results list)
      • Datasets
      • Media elements
      • Template elements
  • A project application, used to limit availability of the module's functionality to specific projects
  • A project application configuration panel to specify which elements, links, and/or format stylesheets should be valid for search and replace
    • For template-based elements and element metadata, elements based on a template marked as valid for search and replace will be processed, others will not
    • For format stylesheets (i.e. text and table formats) in the DOM editor and the DOM Table editor, input components will be processed if the corresponding template is marked active
    • Links embedded in DOM editors: only the link text will be considered during search and replace
    • Search and replace on media and template elements will be processed regardless of project configuration
  • Case-sensitive search (optional)
  • Search in all project languages or a single, specific language

Download

The Editorial Search and Replace module is provided as a source code package. For information about compilation, please see Compilation notes.

Name

Brief description

Editorial Search and Replace

View document The "Editorial Search and Replace" Source Code Package (Version 2024.12) contains a complex example which demonstrates a means to combine a report plug-in with various associated plug-in types and a client-side service.

   

Chapter “Modules: Accessing Web Services via OData/SOAP” >>

© 2005 - 2024 Crownpeak Technology GmbH | All rights reserved. | FirstSpirit 2024.12 | Data privacy