Closed lizbodian closed 11 months ago
@lizbodian, you can put an HTML
tag in the text where you wish the line break to be. For example, if you want the label prefix to print as "AA" on the first line and "BB" on the second line, you put "AA
BB" as the "Text" field for the label prefix.
Sorry, something got messed up in your message. What goes between the AA and the BB? Is it "<br/"?
-Liz
@lizbodian, sorry about that. I forgot embedding HTML in the response would be a problem. Place <br>
in the text where you wish the line break.
Somehow, when I try to do that, I get a blank label. Also, it looks to me like the option that's supposed to make the space for the prefix to display if there isn't one isn't working.
@lizbodian, the "Keep label spacing when field empty" option? It is likely that I forgot to implement that option for the label prefixes.
Could you provide an example of the label prefix which results in a blank label, as well as the source for the label template? You can get the source by editing the template, clicking the "..." in the toolbar, then the "<>" icon. There might be something in your setup that exposes a problem, as my test handled it correctly:
My label prefix text is VFL<br>MDTC
. Admittedly, my test template is pretty simple.
Thanks.
My prefix is Jud
Juv
The code is:
{{field:prefix}}{{field:item_data.call_no}}
{{field:item_data.description}}
Also, if possible, I would like there to be a line break after the prefix if it occurs.
Thanks, Liz
@lizbodian, I think the problem might be that the label prefix and call number are on the same line in the template. At least when I set up my test with your template, I then experienced the blank labels. After inserting a <br />
between the label prefix and the call number, the labels appeared correctly with the two elements of the label prefix on separate lines.
Here's my template source code:
<p>{{field:prefix}}<br />{{field:item_data.call_no}}<br />{{field:item_data.description}}</p>
@lizbodian, just checking in. Did you get this to work for you? Thanks.
Yes, this seems to work fine, and if I can get the issue in my other ticket resolved, I will be in great shape, thanks!
-Liz
http://www.brandeis.edu/library
Liz Bodian
Metadata Systems Librarian
(781) 736-4645
415 South Street, MS 045 Waltham, MA 02453
Pronouns: she/her/hers
On Fri, Jun 9, 2023 at 10:49 AM mgobat @.***> wrote:
@lizbodian https://github.com/lizbodian, just checking in. Did you get this to work for you? Thanks.
— Reply to this email directly, view it on GitHub https://github.com/ExLibrisGroup/spineomatic-cloudapp/issues/111#issuecomment-1584709509, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASMLOZ7DRTBY746S4ZZEEWLXKMZZFANCNFSM6AAAAAAYT4QJUM . You are receiving this because you were mentioned.Message ID: @.***>
I can do multiple lines, but I still get blank space if there is no prefix. Is this fixable?
Thanks, Liz
Hi @lizbodian...
Unfortunately, in the Cloud App's current design, this is not possible. The extra blank line is due to the <br/>
tag following the {{field:prefix}}
in the template. Any HTML in the template is automatically included in the printed label whether the preceding field has a value or not.
Actually, I was able to fix it once you phrased it that way. I just put the break in the prefix template and took it out of the main template. :) -Liz
Ha! I thought of that last night when I couldn't sleep. I tried it a bit ago, and it didn't work for me. Glad it is working for you, though! Great job!
We have a number of label prefixes that we'd like to display on multiple lines. In the desktop app, this was configured by putting a semicolon between lines: Main;Juv . Is this possible in the Cloud App?
Thanks, Liz