.. ================================================== .. FOR YOUR INFORMATION .. -------------------------------------------------- .. -*- coding: utf-8 -*- with BOM. .. include:: ../../Includes.txt Persons ======= Configure persons detail view pid --------------------------------- You can configure the pid where the detail view of persons records will be shown by setting the following constant .. code-block:: typoscript plugin.tx_highereducationpackage_personslisting.view.settings.detailPid = 11 If this is set, a link "Show Details" that points to the configured page will be rendered both in list and contact box plugin. Do not allow to show all persons in one list -------------------------------------------- By default it is possible to show a list of all persons by setting the category mode to "Ignore" which then shows all persons in the frontend in one big list. You may wish to disable that function for privacy reasons. You can do so by adding the following Page TSConfig. .. code-block:: typoscript # remove "show all" mode in persons listing TCEFORM.tt_content.pi_flexform.highereducationpackage_personslisting.sDEF.settings\.categoryMode.removeItems = IGNORE .. image:: ../../Images/Persons/persons-category-mode.png :alt: Persons category mode .. image:: ../../Images/Persons/persons-page-tsconfig.png :alt: Persons Page TSConfig .. image:: ../../Images/Persons/persons-category-mode-without-ignore.png :alt: Persons category mode without ignore mode Import persons from external xml file ------------------------------------- You can import persons from a external xml file. A person can optional have one or more categories. If a person record already exists, it will be updated (including his categories). If a person record does not exist anymore in the import file, it will be deleted in the TYPO3 database (not only set to "hidden" and not only set to "deleted"). The import can be done with a scheduler task or console command. **Scheduler task** For a import scheduler task, there are a few (self-explanatory) options to consider: +------------------------------------------------------+--------------------------------+--------------------------+-----------+---------+ | Option | Description | Value | Mandatory | Default | +======================================================+================================+==========================+===========+=========+ | Absolute path to the source file (XML) | the xml file to import | var/www/html/persons.xml | yes | | +------------------------------------------------------+--------------------------------+--------------------------+-----------+---------+ | Storage (PID) for person records | pid of sys folder for persons | 7 | yes | | +------------------------------------------------------+--------------------------------+--------------------------+-----------+---------+ | Comma separated list of fields to exclude for import | exclude fields from import | last_name, first_name | no | empty | +------------------------------------------------------+--------------------------------+--------------------------+-----------+---------+ | Delete source file after successful import | delete the source file | false, true | no | true | +------------------------------------------------------+--------------------------------+--------------------------+-----------+---------+ **Console command** Similar to the options above, you can can add these also to the console command. For further more information use: .. code-block:: bash vendor/bin/typo3cms higher_education_package:person --help This will show you the help of the person import console command: .. code-block:: bash Usage: higher_education_package:person [options] higher_education_package:higher_education_package:person Options: -p, --path=PATH Absolute path to the source file (XML) -s, --storage=STORAGE Storage (PID) for person records -e, --excludeFieldList[=EXCLUDEFIELDLIST] Comma separated list of fields to exclude for import [default: ""] -d, --deleteAfterImport[=DELETEAFTERIMPORT] Delete source file after successful import [default: false] -h, --help Display this help message -q, --quiet Do not output any message --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug Help: This will import persons from external xml file **Example file: person.xml** * The xml file must contain a root node "persons". * For each person data a node "person" must be included. * Each person data must contain a unique "identifier" string to ensure correct update and delete function. * Each person data can optional have a categories node with one or more category nodes inside * Each category data must contain a unique "identifier" string to ensure correct update and delete function. * Each field must be named after the name of the field in the database (eg. "first_name"). .. code-block:: xml abc123 Doe Dr. Jack M.A. Webmaster Mondays, 1 pm - 3 pm 123 ABC
+49 12345 6789 +49 12345 6789 jack.doe@dummy.net catProf Professor catSo Scientific Officer
abc456 Doe Dr. Jane MA Scientific Officer 987 Campus 1
+49 123 456 +49 123 456 jane.doe@domain.org https://www.dummy.net
.. warning:: For security reasons, the import file must not be located under the web folder of your TYPO3 installation. **Logging** In case of failure during the import, you can activate a file logger to find out more informations. You find the responsible checkbox under extension settings, in a separate tab. The corresponding file is written to ``var/log/typo3_HigherEducationPackageTask_*.log``. Optional you can choose a minimal log level, to differentiate between error and info messages. .. image:: ../../Images/Persons/logging_conf.png :alt: Activate logging in extension configuration :width: 900px Make person fields read-only ---------------------------- By default the person records are editable for users with corresponding permissions. You can set all fields to read-only if you don't want person records to be editable at all by adding the following Page TSConfig. .. code-block:: typoscript # set person fields to "read-only" TCEFORM.tx_highereducationpackage_domain_model_person { title_prefix.config.readOnly = 1 first_name.config.readOnly = 1 last_name.config.readOnly = 1 title_suffix.config.readOnly = 1 function.config.readOnly = 1 consultation_hour.config.readOnly = 1 address.config.readOnly = 1 room.config.readOnly = 1 building.config.readOnly = 1 phone.config.readOnly = 1 fax.config.readOnly = 1 email.config.readOnly = 1 personal_page.config.readOnly = 1 categories.config.readOnly = 1 starttime.config.readOnly = 1 endtime.config.readOnly = 1 sys_language_uid.config.readOnly = 1 hidden.config.readOnly = 1 } .. note:: Currently it's not possible to set the fields "slug" and "image" to read-only this way, thus those fields aren't included in the Page TSConfig above.