[Archivesspace_Users_Group] Add a static web page to ArchivesSpace PUI?
Joshua D. Shaw
Joshua.D.Shaw at dartmouth.edu
Tue Sep 21 08:18:45 EDT 2021
I had used the same framework in the sitemaps plugin before I changed things to work in a different way. You can see the commit that still had a static page here:
https://github.com/dartmouth-dltg/aspace_sitemap/tree/07720814e985193040b202db3d98c8c0c9f6f735/public
You want this piece from routes.rb
ArchivesSpacePublic::Application.routes.draw do
match 'static/html/:page' => 'static_pages#page', :via => [:get]
end
This from plugin_init.rb
Plugins::extend_aspace_routes(File.join(File.dirname(__FILE__), "routes.rb"))
The entirety of controllers/static_pages_controller.rb (without line 8 which formats the xml)
And the view for the static page: views/static_pages/page.html.erb
Hope that helps!
Joshua
________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Valerie Addonizio <vaddonizio at atlas-sys.com>
Sent: Monday, September 20, 2021 6:23 PM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Subject: Re: [Archivesspace_Users_Group] Add a static web page to ArchivesSpace PUI?
Though definitely a different plugin, I do know of this plugin that presents a similar(?) use case:
https://github.com/YaleArchivesSpace/pui-help<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FYaleArchivesSpace%2Fpui-help&data=04%7C01%7Cjoshua.d.shaw%40dartmouth.edu%7C475875c2e1584616dd4108d97c855611%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C637677734956736971%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=jksCIMSbtbkNvezmR9ps5ckBLmDX73p%2FCLopDS%2FwhK4%3D&reserved=0>
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> On Behalf Of Amy Winter
Sent: Monday, September 20, 2021 6:13 PM
To: archivesspace_users_group at lyralists.lyrasis.org
Subject: [Archivesspace_Users_Group] Add a static web page to ArchivesSpace PUI?
Does anyone know where I could get a copy of the plugin/template to add a static page, referred to in the 2019 post from James, below. The repo is gone and not in the Wayback Machine either: https://github.com/hudmol/static_pages<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fhudmol%2Fstatic_pages&data=04%7C01%7Cjoshua.d.shaw%40dartmouth.edu%7C475875c2e1584616dd4108d97c855611%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C637677734956736971%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=guDHLin%2BMZcl%2B31hTOfxUv%2FaVT3ezDLxxXAEJASkSIw%3D&reserved=0>
I can’t find any other reference to this in the list archives or on Google.
Thanks for any help,
Amy E. Winter
Library Information Technology
University of New Mexico
505.277.1233
[Archivesspace_Users_Group] Add a static web page to ArchivesSpace PUI?
James Bullen james at hudmol.com <mailto:archivesspace_users_group%40lyralists.lyrasis.org?Subject=Re%3A%20%5BArchivesspace_Users_Group%5D%20Add%20a%20static%20web%20page%20to%0A%20ArchivesSpace%20PUI%3F&In-Reply-To=%3C179E90E2-E4C7-40C4-8D7A-40DFBE49ACE3%40hudmol.com%3E>
Mon Oct 28 18:02:16 EDT 2019
* Previous message: [Archivesspace_Users_Group] Add a static web page to ArchivesSpace PUI? <https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Flyralists.lyrasis.org%2Fpipermail%2Farchivesspace_users_group%2F2019-October%2F007046.html&data=04%7C01%7Cjoshua.d.shaw%40dartmouth.edu%7C475875c2e1584616dd4108d97c855611%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C637677734956746964%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=%2BypN%2Bf7np%2BJF7%2FplEv%2FgYccC2mfcLBxWjdu9h31HJ3U%3D&reserved=0>
* Next message: [Archivesspace_Users_Group] Add a static web page to ArchivesSpace PUI? <https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Flyralists.lyrasis.org%2Fpipermail%2Farchivesspace_users_group%2F2019-October%2F007048.html&data=04%7C01%7Cjoshua.d.shaw%40dartmouth.edu%7C475875c2e1584616dd4108d97c855611%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C637677734956756964%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=o5bgQnc1uqJtxg509c7WUiK2gBkF4UQmVqxhSQHxXTk%3D&reserved=0>
* Messages sorted by: [ date ]<https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Flyralists.lyrasis.org%2Fpipermail%2Farchivesspace_users_group%2F2019-October%2Fdate.html%237047&data=04%7C01%7Cjoshua.d.shaw%40dartmouth.edu%7C475875c2e1584616dd4108d97c855611%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C637677734956756964%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=bg3Xgchy1x5FylFapN6KfBCJifbMp250QgLR2hDDIwg%3D&reserved=0> [ thread ]<https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Flyralists.lyrasis.org%2Fpipermail%2Farchivesspace_users_group%2F2019-October%2Fthread.html%237047&data=04%7C01%7Cjoshua.d.shaw%40dartmouth.edu%7C475875c2e1584616dd4108d97c855611%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C637677734956766957%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=KIj8C%2F%2ByvHjO6ZrrVG5mlX2lFTop%2BASBm6SdSgw8bvA%3D&reserved=0> [ subject ]<https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Flyralists.lyrasis.org%2Fpipermail%2Farchivesspace_users_group%2F2019-October%2Fsubject.html%237047&data=04%7C01%7Cjoshua.d.shaw%40dartmouth.edu%7C475875c2e1584616dd4108d97c855611%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C637677734956766957%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Wt9qlINscguqXQ%2BKEUH%2BdtQoVzK1bE2%2FsiPqDytPnzk%3D&reserved=0> [ author ]<https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Flyralists.lyrasis.org%2Fpipermail%2Farchivesspace_users_group%2F2019-October%2Fauthor.html%237047&data=04%7C01%7Cjoshua.d.shaw%40dartmouth.edu%7C475875c2e1584616dd4108d97c855611%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C637677734956776950%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=pBCskJXCIbrOBrObsBc13D9i50NOqSZxCTFCp2IzCBw%3D&reserved=0>
________________________________
Hi Kara,
This seemed like a useful thing that I don’t think exists yet, so I made a plugin to do it:
https://github.com/hudmol/static_pages<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fhudmol%2Fstatic_pages&data=04%7C01%7Cjoshua.d.shaw%40dartmouth.edu%7C475875c2e1584616dd4108d97c855611%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C637677734956776950%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=YtCMhpq5VqlpBo1teCVAZiLby8xkADgRIWZU90y%2Fiow%3D&reserved=0> <https://github.com/hudmol/static_pages<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fhudmol%2Fstatic_pages&data=04%7C01%7Cjoshua.d.shaw%40dartmouth.edu%7C475875c2e1584616dd4108d97c855611%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C637677734956786944%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=1CsyOIJCdtMyXlNoYVBywsM6CeacU7He3oMi1BGXW0o%3D&reserved=0>>
Maybe it can be a useful starting point.
Cheers,
James
> On Oct 28, 2019, at 3:52 PM, Kara Hart <kstrosch at wellesley.edu<https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Flyralists.lyrasis.org%2Fmailman%2Flistinfo%2Farchivesspace_users_group&data=04%7C01%7Cjoshua.d.shaw%40dartmouth.edu%7C475875c2e1584616dd4108d97c855611%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C637677734956786944%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=HCuk60NTvRekPJteg8CEP36Pl8zBQVSgyOd%2FC6lfb0A%3D&reserved=0>> wrote:
>
> Hi all,
> I want to be able to add static web pages to ArchivesSpace. I'd like to incorporate the header, top nav, and footer and be able to just add what I want in the middle. I'm basically hoping to create general FAQ, search help, about pages that live in my ArchivesSpace local plugin. Is this possible?
>
> I did find a way to add a page by putting a .html doc into /archivesspace/plugins/local/public/assets, but I have to manually copy in the head, navigation, header, and footer, which is obviously not ideal for updating and probably other reasons.
>
> If there isn't a way to do this, where is the proper place to suggest this enhancement? Should I create a new feature request in Jira the project ANW? (https://archivesspace.atlassian.net/projects/ANW/issues/?filter=allissues&=<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchivesspace.atlassian.net%2Fprojects%2FANW%2Fissues%2F%3Ffilter%3Dallissues%26%3D&data=04%7C01%7Cjoshua.d.shaw%40dartmouth.edu%7C475875c2e1584616dd4108d97c855611%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C637677734956796938%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Gz16YRvCooZDOW4H0DH2naG44HhERWIStTsFjFMy2Yk%3D&reserved=0> <https://archivesspace.atlassian.net/projects/ANW/issues/?filter=allissues&=<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchivesspace.atlassian.net%2Fprojects%2FANW%2Fissues%2F%3Ffilter%3Dallissues%26%3D&data=04%7C01%7Cjoshua.d.shaw%40dartmouth.edu%7C475875c2e1584616dd4108d97c855611%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C637677734956796938%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Gz16YRvCooZDOW4H0DH2naG44HhERWIStTsFjFMy2Yk%3D&reserved=0>>)
>
> Thanks for any help,
> Kara
>
>
> ~~~ Kara S. Hart
> Systems Librarian - Library & Technology Services - Wellesley College
>
>
> !DSPAM:5db7471d288581084719066! _______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org<https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Flyralists.lyrasis.org%2Fmailman%2Flistinfo%2Farchivesspace_users_group&data=04%7C01%7Cjoshua.d.shaw%40dartmouth.edu%7C475875c2e1584616dd4108d97c855611%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C637677734956806934%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=yPfenrnAfScLGvmrzn41ISBT0SVGzm%2BTBrxJ6kpywEM%3D&reserved=0>
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group<https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Flyralists.lyrasis.org%2Fmailman%2Flistinfo%2Farchivesspace_users_group&data=04%7C01%7Cjoshua.d.shaw%40dartmouth.edu%7C475875c2e1584616dd4108d97c855611%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C637677734956806934%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=yPfenrnAfScLGvmrzn41ISBT0SVGzm%2BTBrxJ6kpywEM%3D&reserved=0>
>
>
> !DSPAM:5db7471d288581084719066!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20210921/05de8fd1/attachment.html>
More information about the Archivesspace_Users_Group
mailing list