HomeSuccess.php

107 views
Skip to first unread message

Vincent Hiribarren

unread,
May 2, 2022, 7:40:37 AM5/2/22
to AtoM Users
Hello everyone,

I have been trying to play with different themes for quite a while and for an unknown reason I don't seem to be able to update the content of my main homepage now. In theory, I know that 'homeSuccess.php' is supposed to override the content of my homepage but modifying this file does not help.

Do you know where this might come from? I have read different threads about custom themes but I don't seem to be able to find the file where the information I entered is now recorded.

Best,

Vincent

Dan Gillean

unread,
May 2, 2022, 9:31:41 AM5/2/22
to ICA-AtoM Users
Hi Vincent, 

What version of AtoM are you working with? Are you trying to modify the homepage directly, or have you created a custom theme plugin and are trying to override the default homeSuccess file with your own version in the plugin? What elements of the homepage are you attempting to modify (in case they are actually stored in a different file)?

Note that a custom homeSuccess template will override the existing template (i.e. the look and feel used for the page), but the content itself (i.e. your static page content entered on the homepage) is stored in AtoM's database, and will not be affected by a custom theme template. If you're trying to edit the static page content, but the edits aren't showing up, there may be a problem with registering your theme (see below re: the configuration file) - you can also check AtoM's error logs to see if an error is being thrown when trying to save your static page entry: 
A few resources for creating and managing custom themes:

Basic instructions and an example for creating a theme plugin can be found in our documentation here: 
Be sure to check out the part on creating the configuration file in particular - you need this file for AtoM to know there's a theme plugin! 

We also have some slides here - hey are a bit dated but still mostly accurate:
I'm also attaching a PDF that outlines how to install a theme plugin into an existing AtoM implementation. More implortantly, the second half of the document outlines how a theme plugin is typically organized - so you can ensure that your custom homeSuccess file is in the expected place. 

Additionally, our Upgrading documentation has a few suggestions for files that may need to be manually modified when upgrading with a custom theme, to ensure everything works as expected. See: 
Note that to compile your theme, you may need to install a few dependencies that might not be present if your AtoM instance was originally installed using the downloadable tarball. You will need cURLmake, and lessc installed: 
  • sudo apt install curl
  • sudo apt install npm make
  • sudo npm install -g "less@<4.0.0"
Now we can recompile the CSS for the base Dominion theme: 
  • sudo make -C /usr/share/nginx/atom/plugins/arDominionPlugin
If you have a custom theme plugin, then you will want to repeat this last command, but using the name of your custom theme plugin in place of arDominionPlugin

Finally, it's possible that the content you want is coming from a different file. Keep in mind that AtoM has separate template files for the header and footer, and I believe that the homeSuccess file calls the layout_2col file in some way. So you may want to check these files as well. 

Let us know how it goes! Hopefully with a bit more information we can offer further suggestions on next steps. 

Cheers, 

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


--
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/465375a8-4b0d-4084-963b-13a9c84a0c4bn%40googlegroups.com.
AtoM - Theming - custom theme plugin installation instructions.pdf

Matt Innes

unread,
May 2, 2022, 10:25:09 PM5/2/22
to AtoM Users
Vincent,

I'm not sure if this is your issue, but if you are making modifications to existing .php files and not seeing anything change afterwards, you may just need to restart php-fpm. You'll have to do this every time you make a little change. I had this issue when I was starting to mess around with theming work. Restarting this service is mentioned in the Upgrading documentation that Dan posted, but I'll reiterate it here.

This can be done from the terminal:
sudo systemctl restart php7.2-fpm
OR if you are running a later version like php7.4-fpm
sudo systemctl restart php7.4-fpm

All the best,
Matt Innes
UVic SCUA

mame diarra faye

unread,
May 4, 2022, 7:44:48 AM5/4/22
to ica-ato...@googlegroups.com

Director IFRA

unread,
May 22, 2022, 5:01:34 PM5/22/22
to AtoM Users
Dear all,

Thanks a lot for your help (and apologies for late reply).

Best,

Vincent

Lrellis D'erth

unread,
Sep 6, 2022, 2:13:42 AM9/6/22
to ica-ato...@googlegroups.com
Dear Matt Innes,

THANK YOU SO MUCH.  
I have been hurling invectives at the computer for the past hour, wondering why on earth my theme wasn't changing and how I had managed to fail css, and ALL I NEEDED TO DO WAS sudo systemctl restart php7.2-fpm

You are a wonderful human being.  Thank you so, so much, and I hope you have a lovely week in whatever corner of the world you live in.
Best,
Carolyn.

Reply all
Reply to author
Forward
0 new messages