Now, the warning: every time you upgrade, these changes will be overwritten and lost, because you've made them in the base Dominion theme. You will have to repeat these steps, and any other customizations you make.
A more permanent solution, but also one requiring more development, is to create your own custom theme plugin.
AtoM was built using a PHP framework called Symfony 1.x. AtoM custom theme plugins use Symfony’s plugin architecture, which you can read about more generally here. We generally recommend that new theme plugins extend AtoM’s base Dominion theme, and the arArchivesCanadaPlugin is an example theme we include in all AtoM releases that demonstrates this. We develop all the custom themes we create for our clients following this design pattern - it keeps them contained, and therefore makes future upgrades much easier.
This means that your custom plugin directory will contains files, directives, and assets (such as background images, logos, etc) that, when found, will override AtoM’s default version of these same assets, used in the Dominion theme. Where no alternative versions are found, AtoM will generally make use of the default theme’s assets and styles.
Below is an image showing the subdirectories found in a simple custom theme, which includes a custom homepage:
The config directory will contain a file that registers the plugin in Symfony, so it shows up correctly in your Themes setting page, and works when you enable it. Creating this file is one of the first things you'll do as part of creating your custom theme - see the links above for more information and examples. The CSS directory will contain any custom style sheets used in your theme - generally, you will find most of your customizations in the custom.less file found in the less subdirectory.
The images directory is where any custom assets, such as a splash image for your homepage, etc. will generally be kept.
The modules directory will contain files that override AtoM’s existing modules. If your theme includes changes to the default menus included in AtoM for example, you will likely find those changes in a PHP file located in modules/menus. The number of subdirectories and files here will depend on your custom theme.
Depending on your theme, there may be other directories as well. For example, if your has a custom header, you would likely create a custom _header.php file in a templates subdirectory, or if your theme disables the “Browse by” menu that usually appears on the home page, then you might create a customized version of homeSuccess.php in the templates directory.
You will also need to add a Makefile in the root directory of your custom theme plugin. AtoM uses lessc to extend CSS and as a compiler, that allows us to minimize the CSS files for easier storage and distribution. This Makefile is necessary, and it’s what allows you to compile your theme assets by running the make command.
We do maintain some basic development resources - you'll find some initial ones here:
You will find an overview of the elements that make up AtoM, and a tour of the AtoM code, in the following resources:
https://www.accesstomemory.org/docs/latest/user-manual/overview/intro/
https://www.slideshare.net/accesstomemory/get-to-know-atoms-codebase
AtoM was originally developed using the Symfony 1.x framework, and the Propel 1.x ORM. You might want to familiarize yourself with Symfony before beginning:
Symfony 1.x documentation: http://symfony.com/legacy/doc
AtoM also currently uses Elasticsearch 5.6 (in the upcoming 2.5 version - if you are developing new features we strongly recommend you work against our qa/2.5.x branch) for its search index, Twitter Bootstrap 2.3.2 for theming, and several other libraries. MySQL is used for data storage. We keep all our code in a git repository, so being comfortable with git or other distributed version control systems will also help you. There are a lot of resources out there on all of these!
We maintain a Vagrant box that can be used for local development - see:
In this user forum thread thread, I explain how to upgrade the Vagrant box to ensure you are working against the latest code:
We also have a slide deck that introduces developers to major feature development, here:
You probably won't need this for theme development, but for reference I include it anyway - in terms of understanding AtoM's database and working with SQL, we keep copies of Entity Relationship Diagrams for AtoM's database on the wiki here:
And we have a slide deck that introduces users to performing SQL queries against an AtoM database here:
In terms of working with the Symfony 1.x framework, we recommend that developers adding features to AtoM follow Symfony's plugin development model whenever possible - and this definitely includes custom themes. Most of the existing modules in AtoM have been built as plugins - developing this way makes them easier to maintain in the long-term. Here are some of the best Symfony 1.x resources on Plugin development:
There is also a Symfony plugins page that lists "1458 symfony plugins developed by 609 contributors." These are generally not themes, nor anything to do with AtoM, but they can be a great reference, to see how others using Symfony have developed their plugins for other projects. See:
For reference all of AtoM's current plugins can be studied here:
Comment je peux insérer un logo dans AtoM ? Et comment je peux changer le thème ?
--
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 post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at https://groups.google.com/group/ica-atom-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/40454a63-bbe0-4e05-885f-5c108fff1677%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
When I execute the “make -C plugins/arDominionPlugin", the error has prompted.
:/usr/share/nginx/atom# make -C plugins/arDominionPlugin
make: Entering directory '/usr/share/nginx/atom/plugins/arDominionPlugin'
Running LESS compiler...
lessc --compress --relative-urls css/main.less > css/main.css
The --relative-urls option has been deprecated. Use --rewrite-urls=all.
The compress option has been deprecated. We recommend you use a dedicated css minifier, for instance see less-plugin-clean-css.
make: Leaving directory '/usr/share/nginx/atom/plugins/arDominionPlugin'
--
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/a868d811-7b37-4adf-935e-76294689ad38%40googlegroups.com.