Comments (6)
You are right, i am sorry! I have mistaken a local adjustment as part of the actual branch. You are right, there is no currentCollection
in any branch. If you want to output the collection information, then you need to pass the already resolved collection(s) to your view in the ListViewController.php
$this->view->assign('currentCollection', $collection);
Then call it in the template as i stated above...
If you consider it an expected feature, it would be worth discussing if it should be an option in the listview-plugin.
from kitodo-presentation.
Thanks a lot! That helped me!
For me, it would be an expected feature of the ListView plugin.
It would be a simple straightforward way to display the data entered to a collection. I can put together a PR, then feel free to discuss it there.
from kitodo-presentation.
The Listview-Controller provides such information via the currentCollection
object. In the code it is even assigned to the view, but from what i see it does not get applied anywhere in the template (\Resources\Private\Templates\ListView\Main.html) by default.
It would be required add something like the snippet shown below to the template - but with a lot collections this information block might grow huge. And of course it needs to be styled in your CSS somehow.
I can only speak for certain that it works for the current master branch (not the last release). The current master has already the changes to the collection-plugin that i wrote. This being said i am not sure if the last release already returned a list of collections or just a single item. There were several severe bugs, that made collections not reliable or functional back then.
\Resources\Private\Templates\ListView\Main.html
...
<f:for each="{currentCollection}" as="currentCollectionItem">
<div class="collection">
<div class="collection-label">
<f:if condition="{currentCollectionItem.thumbnail}">
<f:image image="{currentCollectionItem.thumbnail}" />
</f:if>
<div>
<div class="collection-thumbnail">
<f:if condition="{currentCollectionItem.label}">
{currentCollectionItem.label}
</f:if>
</div>
<div class="collection-description">
<f:if condition="{currentCollectionItem.description}">
{currentCollectionItem.description}
</f:if>
</div>
</div>
</f:for>
...
from kitodo-presentation.
I am working with the 4.x branch, but currentCollection
does not exist.
currentCollection
is not found anywhere in the source code?
Main-Branch and 4.x do not differ significantly.
Have your changes been incorporated elsewhere?
Am I looking in the wrong place?
from kitodo-presentation.
Just a few small corrections in case someone wants to use this as example
...
<f:for each="{currentCollection}" as="currentCollectionItem">
<div class="collection">
<div class="collection-thumbnail">
<f:if condition="{currentCollectionItem.thumbnail}">
<f:image image="{currentCollectionItem.thumbnail}" />
</f:if>
</div>
<div class="collection-label">
<f:if condition="{currentCollectionItem.label}">
{currentCollectionItem.label}
</f:if>
</div>
<div class="collection-description">
<f:if condition="{currentCollectionItem.description}">
<f:format.html>{currentCollectionItem.description}</f:format.html>
</f:if>
</div>
</div>
</f:for>
...
from kitodo-presentation.
There are two different templates for the ListView in Kitodo.Presentation:
- Resources/Private/Templates/ListView/Main.html
- Resources/Private/Templates/Collection/List.html
The former is used as a default for any kind of list, that does not have its own template assigned. This template does not contain any information about collections.
The latter is used when ListView is called from within the Collection controller. This template handles collection information assigned by the Collection controller and displays those above the result list.
(At least this is how it should be working. If it's not, that's a bug...)
from kitodo-presentation.
Related Issues (20)
- [Question] Trigger New Tenant Module functions via CLI HOT 1
- [BUG] Search word highlighting does not work (`tx_dlf[highlight_word]`) HOT 1
- [Question] How to use the 3D viewer?
- [BUG] Metadata and structure translation entries HOT 14
- [BUG] PR#1116 somehow broke my viewer. When opening a document with a fulltext it just shows "Volltext wird geladen" HOT 3
- [BUG] Memory leak in kitodo:reindex CLI job HOT 26
- Replace JPlayer HOT 4
- [FUND] Preconfigured, easy to install package for testing purposes HOT 1
- [FUND] Bundle default templates and design with Kitodo.Presentation HOT 1
- Update Documentation HOT 6
- [BUG] Metadata `index_name` still gets changed when moving metadata in list HOT 2
- [BUG] Metadata `sorting` value is `0` for every entry
- Activate GitHub Discussions for this repository HOT 2
- [BUG] Error when saving a Collection
- [BUG] Number of hits for facets incorrect HOT 1
- [Question] Use annotated tags for future releases HOT 2
- [BUG] Error message when using the new reindexing options --index-limit and --index-begin
- [FEATURE] Add feedback for future "unsupported" ALTO versions
- [REVERT] Use TYPO3 DataHandler in the backend HOT 1
- [BUG] Reindexing options -l and -b work not with -c (or long versions) or -a
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kitodo-presentation.