I have a content type, which stores the UUID of another item ( in a text field).
I did not use relations when I made the content type (since some of the items are added from api).
In the view of the item, I just look it up (in the py file), but now we also want to show them in the 'table listing of all items'.
So, in a loop, al:repeat="item python: view.batch()">:
How should I get the title when I have the UUID ( 3f5d75279a754a3db5d3c0229c0fd97b )
Can / should I get it from the template ( TAL ? ) or by looking them up one by one ( ${python: view.find_it(3f5d75279a754a3db5d3c0229c0fd97b) or a helper view). It will be slow (?)
Alternatively, would it be possible to make an indexer ?
using portal catalog is very fast. Don't get the object with the api, it is slower. But if you need to create an url using the uid, you can also use /resolveuid/<UID>.
Can't you just overrride this template as needed, or create a custom my_tabular_view based on it for your content type? If I recall correctly, this already uses batched results. UUID is in your portal catalog, add it to metadata if it isn't already.