[Koha] Dynamic XSLT labels based on framework "Text for OPAC"?

Katrin Fischer katrin.fischer.83 at web.de
Tue Dec 7 00:23:31 NZDT 2021


Hi Tasha,

at the moment it's not possible to use the framework descriptions in the
XSLT files. The descriptions of the fields are part of the XSLT file. I
think with the current mechanisms it would not be trivial to add the
database descriptions.

Unfortunately, the framework code doesn't seem to be available either as
a bug for this is still open:

*BugĀ 11523*
<https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11523> - Make
framework code available to stylesheets to allow for more customized display

When you make changes to the files, you usually have to restart Plack
for your instance to make the change visible immediately.

Hope this helps

Katrin

On 01.12.21 00:34, Bales (US), Tasha R wrote:
> Good afternoon,
>
> I'd like to check my understanding on MARC frameworks.  In my frameworks, I've changed the "Text for OPAC" of various fields, and they display as desired in the "MARC view", but not in the "Normal view".  I am sure this is occurring because these are local 9xx fields; I had to customize the Detail XSLT to get them to show up at all in the OPAC.
>
> My question is... how can I get the XSLT to use the text that is defined in the Framework for this record?  For instance, I have several frameworks that contain a 926 field, but each framework has a different "Text for OPAC".  Is it possible to add a test below?  Just now I tried deleting the label text entirely to see what would happen, but Ctrl+f5 and/or trying in a new browser doesn't reflect my results (a different mystery I am sometimes flummoxed by).  As always, if this is too complex a question, even a pointer would help.  Thanks in advance.
>
> Here is my XSLT (sometimes, "Original Release Date" is correct-other times, "Date of Basic" is needed-it all depends on the framework):
>
> <xsl:if test="marc:datafield[@tag=926]">
>          <span class="results_summary description"><span class="label">Original Release Date: </span>
>              <xsl:for-each select="marc:datafield[@tag=926]">
>                  <span property="description">
>                  <xsl:call-template name="chopPunctuation">
>                    <xsl:with-param name="chopString">
>                      <xsl:call-template name="subfieldSelect">
>                          <xsl:with-param name="codes">a</xsl:with-param>
>                      </xsl:call-template>
>                     </xsl:with-param>
>                 </xsl:call-template>
>                  </span>
>                      <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
>              </xsl:for-each>
>          </span>
>         </xsl:if>
>
>
> Tasha Bales
> Enterprise Services
> http://isesi.web.boeing.com/
>
> _______________________________________________
>
> Koha mailing listhttp://koha-community.org
> Koha at lists.katipo.co.nz
> Unsubscribe:https://lists.katipo.co.nz/mailman/listinfo/koha


More information about the Koha mailing list