Custom Templates

After loading many photos I later decided to develop custom templates for both ‘items’ and ‘photos’ and set both as defaults. With new photos it works as expected. But with existing photos I can select all photos and change the first template, but I cannot access the second template as a group. I have to go to each photo individually to set the second template.
Is it possible to bulk change the second level template?

Bulk editing is currently limited to the item level. We’re working on allowing to select multiple photos at the same time and to enable bulk actions at the photo-level but in the meantime there’s no way to do this in the UI. Have you made a lot of changes to the items yet? If not, you could change the default templates in the preferences and import the items again.

How many photos do you have? If you essentially want to change the template of all photos in the project file you could do that with a single command in the SQLite database. If you only want to change specific photos that could also be a one-liner but it depends on whether or not there are useful query conditions to select the set of photos that should be changed.

1 Like

I am looking for this option as well. With over 13,000 images in the database, I need an option to bulk update the photo template.

@inukshuk what single command would I use in the SQLite database to change all photos in a project to the ‘Tropy Photo’ template?

It depends on your template id. To set all photos to the default photo template you can use the following SQL query:

update subjects
  set template = 'https://tropy.org/v1/templates/photo'
  where id in (select id from photos);