![]() |
#16 | |
Leftutti
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 150
Karma: 948
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
|
Quote:
I get this error Code:
VORLAGENFEHLER The book_count() function cannot be used in a composite column Any idea? Thank you! |
|
![]() |
![]() |
![]() |
#17 | |
Grumpy old git
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,000
Karma: 5057547
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
See Preferences / Tweaks / Allow template database functions in composite columns (ID: allow_template_database_functions_in_composites) |
|
![]() |
![]() |
![]() |
#18 |
Leftutti
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 150
Karma: 948
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
|
![]() |
![]() |
![]() |
![]() |
#19 |
Leftutti
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 150
Karma: 948
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
|
Is there a possibility that the links also works "ouside" of the current view?
If the book is not listed in the view, the linking doesn't work Edit: re-read the manual - not possible Last edited by Wiggo; 03-18-2023 at 02:02 PM. |
![]() |
![]() |
![]() |
#20 | |
Grumpy old git
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,000
Karma: 5057547
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
![]() |
![]() |
![]() |
#21 |
Leftutti
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 150
Karma: 948
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
|
hmm.. you're right. I should concentrate again more while reading.
Anyhow. I don't use VLs. When I search for "same author" then clicking on a related link doesn't lead to the book of a different author. But if I create a VL from the search, then it works. ![]() |
![]() |
![]() |
![]() |
#22 |
Grumpy old git
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,000
Karma: 5057547
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
I understand what is happening. Finding similar authors does a search. That search is still in effect when you click the link, and it is applied to the results. If the book "selected" by clicking the link doesn't match the search then it isn't shown.
It isn't clear to me that a show_book link should preserve/honor the search, but that is a different question. There are two solutions:
Python templates don't require the tweak. |
![]() |
![]() |
![]() |
#23 | |
Grumpy old git
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,000
Karma: 5057547
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
The original template works with these changes, which are now in calibre source. |
|
![]() |
![]() |
![]() |
#24 |
Leftutti
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 150
Karma: 948
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
|
Thank you so much chaley!
Is there any difference in terms of e.g. perfomance between the 3? Which one would you choose? Edit: ahh, with python the view is always cleared. Last edited by Wiggo; 03-19-2023 at 01:13 PM. |
![]() |
![]() |
![]() |
#25 | ||
Grumpy old git
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,000
Karma: 5057547
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Quote:
Given my fix, I would use a modified version of the first template that generates show-book links. It is functionally equivalent to the original GPM template, including not clearing searches, but much faster. Code:
python: def evaluate(book, context): cache = context.db.new_api ids = book.get('#mytextmult', []) answer = [] for id_ in ids: if cache.has_id(int(id_)): answer.append(f'<a href="calibre://show-book/_/{id_}">{id_}</a>') else: answer.append(f"Book id {id_} doesn't exist") return ', '.join(answer) |
||
![]() |
![]() |
![]() |
#26 |
Leftutti
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 150
Karma: 948
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
|
Thanks again!
I will wait for the next release and try this modified python one. |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to style (CSS) Custom columns/fields in Book details pane? What are their IDs? | 01100001 | Library Management | 4 | 09-16-2022 11:06 AM |
book details pane | tracis035 | Calibre | 7 | 11-04-2016 12:00 AM |
Is there a way to change the color of the clickable links in the book details pane? | nalyd | Calibre | 3 | 07-08-2016 02:38 AM |
Calibre:Book Cover size in Book Details side pane & Edit Metadata Individually window | Volfer | Calibre | 3 | 01-05-2016 01:56 PM |