Creating custom Indexing Template

94 views
Skip to first unread message

Chris Maikos

unread,
Oct 4, 2023, 5:16:37 AM10/4/23
to AtoM Users
Good afternoon,

We are currently deploying AtoM for a non-profit library that wants to index the data in a non-standard format loosely based around Dublin-Core.

We have created a copy of the sfDcPlugin and modified it to suit our needs but we can not figure out how to select this plugin as the Default Template in the Settings Menu. The plugins is recognized and activated as expected

Is this possible or do we have to modify the existing plugin to suit our needs? We would prefer to use our own plugin in order to keep the code detached from the core of AtoM

Any help would be greatly appreciated.

Kind Regards,
Chris

José Raddaoui

unread,
Oct 5, 2023, 2:48:34 PM10/5/23
to AtoM Users
Hi Chris,

See this example of a template plugin implementation, when the DACS template was added (back in 2013):


You'll need to do some changes in AtoM's code and its database to make it available in the settings and to be able to use it as the default template. Check:

- The addition of a term for the template to the database: 
- How is the plugin enabled by default:

If you already figured out how to enable the plugin manually, you just need its inclusion in the settings and route config. To create the term, instead of fixtures or migrations you could run a custom script using the `tools:run` task. For example, with the following script:

<?php

$term = new QubitTerm;
$term->parentId = QubitTerm::ROOT_ID;
$term->taxonomyId = QubitTaxonomy::INFORMATION_OBJECT_TEMPLATE_ID;
$term->code = 'cdc';
$term->name = 'Custom DC';
$term->culture = 'en';
$term->save();
   
print("Template term created.\n");


Located in /path/to/atom/add_cdc_term.php, run the following command to apply it:

php /path/to/atom/symfony tools:run /path/to/atom/test_ancestors.php

I hope that helps and let us know if you have further questions.

Best regards,
Radda.

Chris Maikos

unread,
Oct 6, 2023, 1:13:24 PM10/6/23
to AtoM Users
Thank you very much for your help. I have managed to integrate a new template using a custom Dublin Core model.

I modified index and edit php files as well as the actions accordingly and everything works as expected.

One last question, how can I add extra fields on my template? Specificaly I want to add a field to track a custom identifier (Number | Type (Taxonomy)) and a Keywords Taxonomy. I figured out how to add taxonomies (I think) but I cannot figure out how to include the relevant fields in the template forms

Chris Maikos

unread,
Oct 7, 2023, 4:23:12 AM10/7/23
to AtoM Users
Just to add better clarity to the conversation, especially for future users:

I have created my custom template following the commit history from your reply
I have created my custom taxonomy following the commit history from Add actor occupations access points, refs #11081 by jraddaoui · Pull Request #560 · artefactual/atom

I have added the Relevant Fields to the frontend using the template/edit-indexSuccess.php files and I can see them.
They are 2 basic sfWidgetFormInput for keeping track of Issue Numbers in Newspapers and License Numbers in historical marriage documents as well as a Keywords taxonomy.

I am guessing the only thing missing is the logic for the forms to save and load them but I cannot figure out where I need to put this logic. Also do I need to modify the database to add the new fields to the information_object?
Also the taxonomy needs to be following culture and have translations enabled.

I believe if you help me figure out these last two parts the only thing missing would be adding those to ES and import/export jobs which is low priority for me.

Thanks for all the help so far!

Dan Gillean

unread,
Oct 9, 2023, 8:22:06 AM10/9/23
to ica-ato...@googlegroups.com
Hi Chris, 

You've been doing great learning from prior pull requests so far - since I am not a developer I thought at least I could perhaps find another example that might be relevant to your questions. 

Not too long ago we added the ability to include Events on an accession record - only one event starts as a default term in the new Accession Events taxonomy, but users can add more as needed, and they are translatable, etc. The original feature ticket is here: 
You can see the related commit here: 
It does involve database changes, via updates to both entity schema files and a database migration (for ugprading users). 

Hope this helps!

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


Γνωστοποίηση/Αποποίηση ευθύνης: Το παρόν μήνυμα ενδέχεται να περιλαμβάνει εμπιστευτικές-απόρρητες πληροφορίες και απευθύνεται αποκλειστικά στους σκοπούμενους παραλήπτες. Σε περίπτωση που περιέλθει σε εσάς από λάθος, δεν πρέπει να το επεξεργαστείτε ή/και προωθήσετε καθ’οιονδήποτε τρόπο. H επικοινωνία μέσω Διαδικτύου (Internet) δεν είναι ασφαλής, και η ScanMaster δεν αποδέχεται ευθύνη για οποιαδήποτε ζημία ή απώλεια προκύψει από τη χρήση του παρόντος ή των συνημμένων του. Το περιεχόμενο του μηνύματος δεν δεσμεύει την Εταιρεία ScanMaster πλην των περιπτώσεων τήρησης των προβλεπόμενων διαδικασιών εταιρικής εκπροσώπησης.

--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/4b7588b0-bf6d-47eb-adc9-b30d00bea5cfn%40googlegroups.com.

Chris Maikos

unread,
Oct 9, 2023, 12:50:43 PM10/9/23
to ica-ato...@googlegroups.com
Thank you for your input Dan,

I have managed to implement the following:

Create new template based on the Dublin Core
Implement new taxonomy with translations
Add new fields to the template

This concludes the current needs to our project.

Right now we only need to fix some minor kinks (fix ES, implement import/export)

I would like your help with a single thing of possible. Right now our biggest indexing task is newspapers. The way we are approaching it is creating a top level Collection with the basic information of the Newspaper title, a second level folder that encapsulates issued papers for each calendar year and under that our files which are the actual newspapers.

The way Atom handles viewing archival descriptions is by presenting a card or list with the title taken from the indexing templates title field. This can be problematic when indexing newspapers as the top middle and final level will inevitable have the same title (The newspapers title). Is there a way to change this behavior?

Lastly, my archivists really love the tree view that is available when using the ISAD template. Dublin Core and others do not have that. Is it possible to implement it for our template somehow?

Kind Regards,
Chris

Ndivhuwo Phaduli

unread,
Oct 10, 2023, 7:21:04 AM10/10/23
to ica-ato...@googlegroups.com
Good day
Any one doing ATOM Training in South Africa?
regards
Ndivhuwo


Dan Gillean

unread,
Oct 10, 2023, 2:27:15 PM10/10/23
to ica-ato...@googlegroups.com
Hi Ndivhuwo, 

There is actually a South African regional AtoM Users group, with their own user forum. See: 
I would recommend that you try posting in that forum to see if there is a regional group or service provider offering trainings at this time. Good luck! 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him

Dan Gillean

unread,
Oct 10, 2023, 2:48:02 PM10/10/23
to ica-ato...@googlegroups.com
Hi Chris, 

The way Atom handles viewing archival descriptions is by presenting a card or list with the title taken from the indexing templates title field. This can be problematic when indexing newspapers as the top middle and final level will inevitable have the same title (The newspapers title). Is there a way to change this behavior? 

I *think* you are talking about how AtoM shows search/browse results? If yes, then I'm sure there is a way to change how or what field is displayed, but it will be rather complex. So far I have found that: 
Beyond that, things get a bit beyond my abilities as an non-developer / archivist to understand the code. But I think you'll need to figure out where the getResults function is first declared, and look at that. 

In any case however, you would quickly find yourself going down a bit of a rabbit hole if you are trying to index a different field than the title for search/browse results. Because there is also the page title given to the browser, the title used in exports (including DC XML, MODS XML, and the ISAD and RAD CSV templates), the configurable inventory list, the admin-enabled hierarchy browser, etc.... And likely much more. It becomes worth asking - why not simply title your records differently, if you want users to see different information in the search browse results?

Lastly, my archivists really love the tree view that is available when using the ISAD template. Dublin Core and others do not have that. Is it possible to implement it for our template somehow?

 In AtoM the simple DC template is not set up to provide hierarchical relationships like other templates, because the DC elements supported would not allow for such a representation in the DC XML, and at the time it was developed the budget was rather limited, and the focus more on discrete items. Again, I'm sure you could add it, but it might have been easier to start with a clone of the ISAD, RAD, or DACS templates, and remove or modify fields as needed for your local custom template, rather than try to figure out how to add the treeview into the DC template and your custom offshoot now. 

I will see if our developers have any tips to pass on for either of these questions, but again, the best place to start will be to study how it is done in the existing templates. 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him

Reply all
Reply to author
Forward
0 new messages