EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #10033


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

Re: [EP-tech] "newbie" questions about customizing and static pages


CAUTION: This e-mail originated outside the University of Southampton.

> Am only sorry for any pain you experienced with the EPrints API.

Well, it's not that it was painful, but rather that I had to resort to
trial and error. I'll get back to it below.

> EPrints' Publications flavour, of course, has a lot of the work done
> for you, if you wish to have an Open Access Repository solution out of
> the box.

We've almost switched over to Omeka, however I had previous
disagreements with previous maintainer but they mostly stemmed from
them using an outdated version on a quite ancient platform. I set out to

a) make it current (we're now running eprints with Debian 12 as opposed
to Centos 6 earlier). There's already 3.4.6 configured and ready to
switch, but... things happened, so I'm postponing it until the end of
this week).

b) make it look modern, responsive and finally being like an
international project with a hefty government grant. That has already
happened as you can see.

Surprisingly, suddently my boss put me at the helm, so that's how it
started.

> Do you have any code to share on your approach? ( I.e. when you
> mention creating a view, are you talking about, for example:
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpbc.uw.edu.pl%2Fview%2Fdivisions%2FCogito.html&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C438f6ead6d1542f65e9908dd60ad51b5%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638773019704376039%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=z2gBcueT5a3I4aHZP5dTpHoUdDP0xBjJ4pp%2FZblHWdE%3D&reserved=0 - and then of course
> am curious as to where the prototype code was or is, that fetched the
> html? ).

Well, this is a separate idea of mine - to add descriptions to subjects
but in autogenerated views, rather than static pages (so the other way
around) displayed above the tree, and still working on it.

> Are you able to share how you first attempted it via Perl and the
> EPrints API, and then what the obstacles you encountered were?

So going back to the original idea:

> If all you wanted was a static page, there is an EPrints ingredient
> you can use called Easy Pages, =).

My foremost goal was to create consistent layout across every single
page. The previous maintainer created repositories, each with single,
literal HTML files which not only looked, shall we say: dated, but they
also had to be changed manually on repository update. That's where (the
first, now fully realized) idea of including a view within a static page
came out. As per wiki, I managed to get the tree, but it looked ugly
and took ages to generate. So I started reading about customizing views
and got eiphany upon figuring out that I always had an answer before my
eyes: the "include => 1" parameter, which wasn't explained on
Views.pl wiki page, but was mentioned in customizing views :)
The only piece of the puzzle was a simple prototypejs script that
replaced content of id'd div. If it wouldn't work, the user is still
presented with an ordinary link to division.

Meanwhile I discovered other files, that were used to provide
descriptions to divisions. So I created metafield for divisions
(actually the full subject tree, because it was easier), added it to the
workflow and asked for the content from those HTML files to be moved
into metadata (to eventually move it myself, because of course I had
to).

So, I tried to define a pin onto dynamic_template.pl as per
instructions within the wiki, but I was hitting a lot of undeclared
properties.

Adding from your next email:

> If it's a field, it could be a simple epc statement to show a
> description if one exists, and not if it doesn't.

I tried that and view does not seem to access metadata fields so they're
undefined. Or maybe I don't understand how they're accessed from view.
I will try to come up with a coherent function (for now I just tried
to access and grab values) in a few days.

--
Marcin Roguski
Specjalista informatyk
Wydział Dziennikarstwa, Informacji i Bibliologii UW
tel. (22) 55 23 714