Alternate Label on Linked Resources Block

Hello,

I wanted to customize a theme to show the Alternate Label as a Title for the Linked Resources block instead of the default label.

I am trying to edit the linked-resources.phtml file and have a feeling that it would be somewhere in here:

<caption class="linked-resource-property"><?php echo $escape($this->translate($values[0]->property()->label())); ?></caption>

is there a way i can call the alternate label? to have that displayed instead. I am not sure how do I reference it, knowing that the alt labels are usually stored in the template metadata

Many thanks,
Sanjin

What version of Omeka are you using? What theme are you using? The recent versions include the alternate label as a column.

Hi Jim,
I am using 3.2.1, though I guess I am using a rebuild of an old version of a theme…
Just to be clear that it is the title I want to change at the top of each of the linked resource list, but if this is the case with the new themes, I could look at that code to see if i can copy it?

I actually removed the column for the alternate label in the list because my client did not want that. It was the heading they wanted to change.
Sanjin

The reason why we don’t print the alternate label in the <caption> is because we can’t assume that every subject item is using the same resource template, so we have to use the original property label. That’s why we included the alternate label column.

If, in your case, it’s safe to assume that every subject item uses the same resource template, I suppose you could get the template of the first resource and get the property’s alternate label, like this.

Thank you so much, that makes perfect sense and I have updated the code that I have with the extract you showed me. Thanks again.