![]() |
#1 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Jan 2017
Device: Sony Reader
|
Calibre Content Server: change summary.html (downloadlinks)
Hi all,
I want to change the summary.html of the calibre Content Server, wich displays the list of books. I replaced the "get" Button with Code:
<a href="{get_url}" title="{fmt}">{fmt}</a> <div class="formats">{other_formats}</div> Code:
epub Other formats: MOBI, PDF Code:
EPUB, MOBI, PDF I found this Site: https://manual.calibre-ebook.com/template_lang.html but a simple {fmt:uppercase()} does not work. Looks like I got something wrong. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,342
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You cannot web page templates dont support the calibre template language.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Jan 2017
Device: Sony Reader
|
Kovid, thank you very much. That helped a lot - I was running in a totally wrong direction.
Finally, I found an other way and have a working solution. This Solution is not good for everyone, because it does not work for all possible formats. I added three custom columns (calculation from other columns): Code:
epublinktext {formats:contains(EPUB,EPUB,)} mobilinktext {formats:contains(MOBI,MOBI,)} pdflinktext {formats:contains(PDF,PDF,)} Then I put this code into the summary.html instead of the "get"-button: Code:
<a href="/get/epub/{title} - {authors}_{id}.epub">{#epublinktext}</a> <a href="/get/mobi/{title} - {authors}_{id}.mobi">{#mobilinktext}</a> <a href="/get/pdf/{title} - {authors}_{id}.pdf">{#pdflinktext}</a> This is working from the local network and from the internet per reverse proxy. complete summary.html: Code:
<div id="summary_{id}" class="summary"> <div class="left"> <a href="{get_url}" class="summary_thumb" title="Click to read {title} in $ <img alt="Cover of {title}" src="{prefix}/get/thumb_90_120/{id}" /></a> <div> <a href="/get/epub/{title} - {authors}_{id}.epub">{#epublinktext}</a> <a href="/get/mobi/{title} - {authors}_{id}.mobi">{#mobilinktext}</a> <a href="/get/pdf/{title} - {authors}_{id}.pdf">{#pdflinktext}</a> </div> </div> <div class="right"> <div class="stars"> <strong>{id}</strong> <span class="rating_container">{stars}</span> <span class="series">{series}</span> <a href="#" onclick="show_details(this); return false;" title="{detail$ <a href="{prefix}/browse/book/{id}" title="{permalink_tt}">{permalink}$ </div> <div class="title"><strong>{title}</strong></div> <div class="authors">{authors}</div> <strong>Languages:</strong> {languages} <div class="tags">{tags}</div> <div class="comments">{comments}</div> </div> <div class="details-href" title="{details_href}" style="display:none"></div> </div> |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
A little change in functionality (content server) | windigo | Development | 2 | 03-11-2015 04:02 PM |
Calibre Content Server - change port - Windows Firewall Settings | rl77 | Calibre | 2 | 02-19-2014 02:15 PM |
Change Browsing by: Series display for calibre content server | lynncal | Calibre | 2 | 04-22-2013 01:56 AM |
500 Internal Server Error accessing content server Calibre 0.8.8 | DaddyO57 | Calibre | 1 | 07-20-2012 06:08 PM |
Calibre Recipe HTML content differs from raw html of index.html. | krunk | Calibre | 4 | 09-20-2010 09:48 PM |