Creating a new Theme by extending arArchivesCanadaPlugin

67 views
Skip to first unread message

Uwe Jung

unread,
Mar 4, 2018, 3:20:01 PM3/4/18
to AtoM Users
Hello,

Modifying the arArchivesCanadaPlugin with lots of new functionalities leads to the fact that a new Theme would be a more proper solution. I believe this is necessary because a new AtoM version could maybe overwrite the "original" arArchivescanadaPlugin. Isn't so?
Unfortunately I'm not able to create a new theme, I followed your instructions except the the git commands. At the end the new theme is not visible on admin > themes page. So AtoM don't recognize the theme. The $summary string in the config.php contains the pattern "Theme". The cache has been recreated more than one time. Without success.

Meanwhile I prefer to switch to the new plugin somewhere within the config files. But I can't find such a switch. So where does AtoM store the information about which theme has to be load?

Thanks

Uwe Jung

 

Dan Gillean

unread,
Mar 5, 2018, 11:21:37 AM3/5/18
to ICA-AtoM Users
Hi Uwe, 

I'm not sure which instructions you've followed, but for reference, here are two different resources that might offer some help: 
You can see the repositories with the example themes mentioned in these documents here: 
If you are not downloading the reference themes from git as a starting point, then there may be some elements you'll need to copy and create locally yourself. 

For the theme to show up in Admin > Themes, the plugin must first be registered in Symfony. This involves create a config directory in your new plugin, and adding a configuration class PHP file to it. This is outlined in the Docs link above - make sure you change the name of the theme to your own theme's name in the config file when copying the contents. You may also need to compile the CSS in your new theme after clearing the cache - change directories to your new theme, and run the make command. For example, I can run this for the Dominion theme like so: 
  • make -C plugins/arDominionPlugin
If that command doesn't work for your theme, it may be because you haven't created the Makefile - see slide 9 in the deck linked above. You can copy the content's of Steve's makefile to yours, from here: 
Additionally, when you clear the application cache, don't forget that both PHP-FPM and memcached have their own caches as well, so you also should restart these services. 

In Ubuntu 14.04 with PHP 5.x:
  • sudo service php5-fpm restart
  • sudo service memcached restart
In Ubuntu 16.04 with PHP 7.0: 
  • sudo systemctl restart php7.0-fpm
  • sudo systemctl restart memcached
I believe that once your plugin is visible in Admin > Themes, the setting value for which theme to load is stored in the database. Once you set it, it should stay selected until you change it again. However, there may be ways to indicate what plugins are default via a config file as well - if you want to explore that, you will need to dig further into the Symfony 1.x documentation. This page might be a good place to start: 
I hope this helps - let us know how it goes! 

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

--
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-users+unsubscribe@googlegroups.com.
To post to this group, send email to ica-atom-users@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/750a7a2a-f08e-4302-9efe-8104fd24124a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages