Skip to content

Restructuring Categories and Directories

imperia allows you to restructure existing categories and their directories in order to adapt to new requirements circumstances, e.g. new structure of a website or redesigned processes.

Categories may contain webpages, i.e. documents and/or assets, e.g. media files, and are arranged in the structure as they appear on the website (sse also chapter Categories in this manual).

By 'restructuring categories' you not only change the sequence of the documents, but you can also adapt to the working methods of the editors.

In this chapter you will be explained in section Restructuring Categories how to rearrange their structure (ex- or including the directories).
You can also rearrange directories independently from the categories, see section Restructuring Directories.

This separation between the categories's structure and their directories has following benefits:

  • When restructuring categories the directories remain unchanged. By that, there will be no conflict when creating the website.
  • Vice versa: The restructuring of directories has no effects on the categories. By that, the views on categories and thereby the working methods of the editors remains unchanged.
  • You can, of course, restructure categories together with their directories, too. By that, you can ensure that the links are set correctly and don't have to be updated subsequently in an additional worklfow step.

Also, the process of restructuring (of categories or directories) is separated from the actual implementation (ToDo list):

  • first, you restructure the categories or the directories; in doing so, a ToDo list will be created as a preparation for the restructuring.
  • secondly, the restructuring will be rund 'physically' by implementing the ToDo list. The advantage of this separation is that the time-consuming process of the actual implementation can be rund at a later time than the restructuring.

General Restrictions

  • Before restructuring, imperia must be put in maintenance mode to prevent inconsistencies because of document processing.
    Otherwise, it can lead to inconsistencies e.g. when creating new documents in those categories.
  • Restructuring of categories and directories never affects exisiting documents, but only newly created ones.
  • If the Hermes deamon is running, the restructuring will be published directly to the target systems.
  • The restructuring can only be done by the “superuser” group.:
    • The permission for the restructuring can only be defined in the system, not via imperia's UI.
    • When the permission is not set, the options Structure->Restructure Categories and Structure->Restructure Directories will be not displayed in the menu. Also, in the controller tree a s is added to both the controllers doc_tree as well as path so that they cannot be edited.

Restructuring Categories#

Restructuring categories is divided into two basic sub-functions:

  • You can change the sequence of categories. Thereby, the directories remain unchanged.
  • You can move categories beneath other categories in order to create an hierarchy between categories. This can be done including or exluding their directories.

Changing sequence of categories#

The sequence of categories has a direct affect in the categories tree. That means, in opposite of restructuring catgories, there is no ToDo list that is implemented at a later time - the sequence will be changed directly.

Changes of the sequence can also be applied to subcategories, but not to the hierarchy of the categories. That means, by this function, you cannot move a sub category to a main category. To do so, you have to move categories.

Note

For this function, there is no need to change into the maintenance mode.

To change the sequence of categories, proceed as follows:

  1. Open Structure->Categories. The following page opens: ![page CATEGORIES] (images/admin/moving/categories_sequence.png)
    By the end of each category, you will find icons for editing the catogproes..
  2. Click to open the submenu of the desired category: ![submenu] (images/admin/moving/submenu.png)
  3. Choose the desired option (Move Up or Move Down) to change the sequence of the desired category.

The sequence will be changed and saved directly and therefore affects every user of the categories' tree!


Move categories (Option 1 & 2)#

In contrast to Changing sequence of categories, with this function you are allowed to move categories of different levels, i.e. main or sub categories equally. That means, you can move a sub category into another main category or a main category into a sub category.

As already mentioned in this introduction, the restructuring is done separately from its actual implementation. Therefore, in this section you will be shown how to move the categories and thereby prepare the ToDo list. In the section run the ToDo list you will be shown how to implement the moved categories.

Also, the moving of Document Categories (Option 1) is done separately from moving of Assets Categories (Option 2). The reason for this is that assets do not appear in the website's navigation and therefore should not be moved into document categories.

For both categories you can decide to simultaneously move the categories' directories. Or you can move the directories separately from the categories at a later time. A later moving of the directories can be useful when a category including its directory have been moved, but while reimporting documents, the old directory hasn't changed.

Note

  • Moving to the root directoy is not possible.

  • When selecting the Move document categories option, only document categories will be displayed in the Selection dialog. And vice versa, if the Move asset categories option is selected, only asset categories will be displayed.

  • No files will be moved, only “transferred”.

  • Wrongly moved categories can only be undone by deleting/not-run the ToDo list. You then have to move the catogories from start.

The following instructions apply to both moving document and asset categories. The only difference for asset categories is that asset variants are not displayed in the dialog, because, in contrast to copy pages, they cannot be moved individually.

  1. Open Menu->Structure->Restructure categories. A new page opens where you can select between Option 1: Move categories with documents or Option 2: Move categories with assets.
  2. Once the option is selected a new dialog opens, where two tree views (Source and Target trees) of the categories and their associated documents/assets are displayed.
  3. There, select the desired category in the Source tree on the left as well as its the target category in the Target Tree on the right:source target category
  4. For multiple selection the Enable multiple items moving checkbox has to be selected.
  5. Click on Proceed to continue.
    The Path updating proposal dialog opens, where you can select following options:

    • I do not want to do any path manipulation now.
      If this option is selected no path (directories) updates will be done during the restructuring.
    • Overwrite existing files.
      If other files, different than the files directly affected by the restructuring, are affected by the newly computed paths, the process is stopped and the conflict has to be resolved manually. If the “overwrite existing files” option is activated, all files will be overwritten. Copy pages of directly affected by the restructuring documents are always overwritten.
    • Directory of source category
      lists the source category's directory.
    • Directory of target category
      lists the target category's directory.
    • New directory of moved category
      lists newly calculated directory from the source and target categories.
    • Patch directories of categories, that match the source category directory
      the category tree is search and if a directory corresponding to the source directory is found, it will be adjusted according to the proposals.
    • Only patch directories of subcategories
      this option limits the previous one to subcategories of the category being moved.
    • Only change paths of documents that belong to the moved category
      only paths of documents that are within the category to be moved are updated. If this option is not selected paths to all documents in the source category will be updated.
  6. After selecting the appriopiate options, click again Proceed to prepare the ToDo list. A status report will be diplayed, see following figure: ToDo list

You have now completed the moving of categories and created the ToDo list. You can run the ToDo list at a later time or now, by clicking on Process ToDo list the ToDo list will be rund; read the section run the ToDo list for more information.

If you haven't moved the directories (i.e. if you have activated the checkbox I do not want to do any path manipulation now), you can do it afterwards. Read the next section, to proceed.


Restructuring Directories and Files#

In order to move directories, go to Menu->Structure->Restructure directories.

There are also two options to move directories:

  • Option 1: Restructure directories/files
  • Option 2: Rename directories.

Note

Moving or renaming files and directories, does not affect the categories' structure.


Restructuring Directories or files (Option 1)#

As described above, the restructuring of directories can be done separately from categories. Here also, first the restructuring is carried out, then the ToDo list can be started.

In the following you will be explained how to prepare the directories for the ToDo list. In the section run the ToDo list you will be shown how to implement the moved directories.

Note

  • In imperia, directories containing 5 or more digits are 'counter directories' and will be moved with documents. If counter directories are defined differently in your system, please change the variable DIRECTORY_COUNTER_REGEX in the system configuration.
  • As for categories, moving to the root directoy is not possible, unless the directory is renamed to “/”.

  1. Go to Menu->Structure->Restructure directories.
  2. Select Option 1: Move directories/files.
    A new dialog opens where you find tree views of the source directories and their associated documents on the left and the target directories on the right: source target directories
  3. In order to move directories select the desired directories in the source on the left and the target directories on the right.
    By enabling the option Enable multiple items moving you can move multiple directories and files.
  4. Click Proceed to continue. A new dialog opens where you can set following options for the selected directories:
    Please check the path when you have moved multiple directories.
    • Overwrite existing files - if this option is not checked (default), the process will stop just before it would overwrite a file. This issue has to be fixed manually before proceeding. If this option is enabled, all files will be overwritten. Copy pages of directly affected by the restructuring documents will be overwritten.
    • Source directory - the directory that will be moved.
    • Target directory - the target directory of the restructuring.
    • New directory - the new path of the moved directory.
    • Patch directories of categories, that match the source directory - if paths that match paths of the directory to be moved are found in the category's settings, the latter are adjusted.
  5. Click Move selected object to run the moving and prepare the ToDo list. A status report of the ToDo list will be displayed.

The system has created a ToDo list of the procedure. You can run the ToDo list at a later time or now, by clicking on Process ToDo list; read the section run the ToDo list for more information.


Renaming Directories (Option 2)#

In this section it is possible to either change the name of a particular subdirectory or change the whole path. To do so, select the Rename directories option from the initial dialog.

  1. Go to Menu->Structure->Restructure directories.
  2. Select Option 2: Rename directories.
    A new page opens where you will find the directories in a tree view.
  3. Click on the name of the desired directory. This opens a dialog.
  4. In this dialog, enter the new name in the New path input field and save the changes with OK.
  5. When you are finished with renaming, click on Proceed. A new page opnes where you can set different options for the selected directories. See above for more information.
  6. Click Move directories in order to run the renaming and prepare the ToDo list. A status report of the ToDo list will be displayed.

The system has created a ToDo list of the procedure. You can run the ToDo list at a later time or now, by clicking on Process ToDo list; read the next section run the ToDo list for more information.

Run the ToDo list#

As already described earlier, the restructuring will be carried out in two steps. In the first step, a “ToDo” list is created, which is then processed in the second step.

Note

  • Restructuring tasks are performed based on a ToDo list. This ToDo list is called /site/logs/moving.todo. This file is stored, even after successful processing, until the next task is started.
  • The interface is regularly updated via AJAX during a processing. The progress is held in the /site/logs/moving_ajax.log moving_process_ajax.output moving_create_ajax.output file, which is deleted automatically at the end of a restructuring.
  • The restructuring protocol is written in the /site/logs/moving.log file, for example:

    [Do Sep 09 17:24:59 2010] [info] Start creating todo list.
        [Do Sep 09 17:24:59 2010] [info] Scheduled document '/47/50/54/100' for moving.
        [Do Sep 09 17:24:59 2010] [info] Scheduled document '/47/49/51/96' for moving.
        [Do Sep 09 17:24:59 2010] [info] Scheduled document '/47/49/53/99' for moving.
        [Do Sep 09 17:24:59 2010] [info] Scheduled document '/47/49/52/97' for moving.
        [Do Sep 09 17:24:59 2010] [info] Scheduled grafiker file '/2/product_y' 
        contained in document '/47/50/54/100' for moving.
        [Do Sep 09 17:24:59 2010] [info] Scheduled grafiker file '/2/ii/product_a' 
        contained in document '/47/49/51/96' for moving.
        [Do Sep 09 17:24:59 2010] [info] Scheduled grafiker file '/2/ii/product_c' 
        contained in document '/47/49/53/99' for moving.
        [Do Sep 09 17:24:59 2010] [info] Scheduled grafiker file '/2/ii/product_g' 
        contained in document '/47/49/52/97' for moving.
        [Do Sep 09 17:24:59 2010] [info] Finished creating todo list.
    
  • The assignment of the currently started restructuring to the ToDo file is done via a ticket.

    • The ID of the ticket is specified in the user interface from one step to the next. In this way, their own processes can be seen clearly.
    • The additional information needed is stored in the /site/logs/moving.ticket file. This file is automatically deleted at the end of the restructuring.
  • Only one restructuring process can run at a time. If there is a running process, a warning is displayed. Only when a restructuring is completed, a new process can be started.
  • Please make sure that the you are in the maintenance mode.

1. Starting the ToDo list

  • As described above, by clicking the button Process ToDo list, you start the ToDo list directly after moving/renaming categories/directories.

  • If you want to start the ToDo list at a later time, process as follows:

    1. Go to Menu->Structure->Restructure directories or Restructure categories.
      The STATUS page of the ToDo list opens automatically as you have always to run the ToDo list before creating a new one.
    2. Click Proceed to start the ToDo list.

The ToDo list now runs. The processes that run in the background are described in the following:

a) Following processes are carried out while preparing the ToDo list, i.e. after you have moved/renamed categories/directories:

  1. Scans the entire category tree to see if any paths must be updated.

  2. Calculates the new category's NodeID (only in restructuring categories).

  3. For each affected document

    • A new NodeID is calculated (only in restructuring categories).

    • All references (links to this document) are collected.

    • All graphic objects are collected.

  4. If the list is compiled, a summary about how many objects will be changed is displayed. This allows for an approximate time estimation.

b) Following processes are carried out when run the ToDo list, i.e. after you have startet the ToDo list:

  1. “Transferring” categories in the data management (assigning the newly created NodeIDs).

  2. Loading all documents, adjusting meta information, storing for:

    • version of SiteMeta

    • last version from the archive

    • or the version in a workflow

    • affected Copy Pages

  3. Reparse all relevant documents

  4. Loading all references, adjusting meta information, storing for:

    • version of SiteMeta

    • last version from the archive

    • or the version in a workflow

    • affected Copy Pages

  5. Reparse all relevant references

  6. Explicitly delete all graphic objects in their old position.

  7. Presenting proposals for manual path adjustments

    • In template

    • In flex modules

    • In slot modules

    • In includes

    • In the dynamic.conf, system.conf, smart-meta.conf, FTS.conf, index.conf.

2. Finish ToDo list

After the ToDo list has been processed, another status page opens where you get an overview report of the moved categories or directories.

You can then Close the page.

The restructuring process of categories and directories is now completed.