<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>The user-defined fields are in the JSON for objects that have
them (e.g. resources), so you can display them with something like
this:<br>
</p>
<p><%= @result['json']['user_defined']['text_1'] %></p>
<p>But shared templates like _record_innards.html.erb also render
other objects which don't have user-defined fields (e.g. archival
objects) so the above would error when displaying those. So you'll
need to wrap that in something that uses the has_key? method.<br>
</p>
<p>In general, be aware that overriding _record_innards.html.erb has
long-term maintenance implications. That is because it is often
changed in ArchivesSpace releases, meaning someone will have to
review and possibly re-implement you customizations when upgrading
in the future.<br>
</p>
<p>Also, user defined fields aren't exported and don't appear in
PDFs, so unless you also override those as well then they might
not be suitable for essential information in the long term.<br>
</p>
<p>Andrew.<br>
</p>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">On 05/05/2021 21:32, Bhavin Tailor
wrote:<br>
</div>
<blockquote type="cite" cite="mid:fdd22e9df7d5416a0d1bd6449dda71f75e4c531b.camel@clemson.edu">
<div>Hi all,</div>
<div><br>
</div>
<div>This may (or may not) be simpler than a lot of the questions
here. How do you get a user_defined_field to display in the PUI
? I've gone through the documentation and tried a number of
things but I'm likely missing a step along the way. I've
modified the label for the admin interface but just can't seem
to get it to display in a resource record on the public side.
I've mostly been working in the _record_innards.html.erb but
have yet to have luck.</div>
<div><br>
</div>
<div>Many thanks in advance,</div>
<div>Bhavin</div>
<div><br>
</div>
<div><span>
<pre>--
</pre>
<div>Bhavin Tailor</div>
<div>Senior Web Developer</div>
<div>Clemson University Libraries</div>
<div>864-656-6375</div>
</span></div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Archivesspace_Users_Group mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org">Archivesspace_Users_Group@lyralists.lyrasis.org</a>
<a class="moz-txt-link-freetext" href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a>
</pre>
</blockquote>
</body>
</html>