Zim

Are there recent changes in the definition / processing of HTML templates?

Asked by gottelt

Hi,
it seem that there are recent changes in how templates for the HTML export are defined and / or used.
I have template that worked well with zim 0.60. Now I've updated to zim 0.65 and the same template gives me a html folder with empty files. This appears to be related to linking synthax: While in my past exports I find the subpages linked in the index file via <li><a href="./Folder/SubFolder/file.html... </a></li> (This also works when I export with the default tempplate)
When I now apply my own template to export the links look like
<li><a href="#Folder:SubFolder:File/"...</a></li>

Can you help me with fixing this?
Appreciating any help,
Friedrich

Question information

Language:
English Edit question
Status:
Solved
For:
Zim Edit question
Assignee:
No assignee Edit question
Solved by:
gottelt
Solved:
Last query:
Last reply:
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) said :
#1

Hi,

Yes, the template syntax has changes slightly. The templates that ship with
zim are all updated, but if you made a custom template it needs some
changes. I can help, but I need to see the template you use, not just the
output.

See this page for the full documentation:
http://www.zim-wiki.org/manual/Help/Templates.html

Regards,

Jaap

On Thu, Feb 4, 2016 at 5:08 PM, gottelt <
<email address hidden>> wrote:

> New question #284585 on Zim:
> https://answers.launchpad.net/zim/+question/284585
>
> Hi,
> it seem that there are recent changes in how templates for the HTML export
> are defined and / or used.
> I have template that worked well with zim 0.60. Now I've updated to zim
> 0.65 and the same template gives me a html folder with empty files. This
> appears to be related to linking synthax: While in my past exports I find
> the subpages linked in the index file via <li><a
> href="./Folder/SubFolder/file.html... </a></li> (This also works when I
> export with the default tempplate)
> When I now apply my own template to export the links look like
> <li><a href="#Folder:SubFolder:File/"...</a></li>
>
> Can you help me with fixing this?
> Appreciating any help,
> Friedrich
>
> --
> You received this question notification because you are an answer
> contact for Zim.
>

Revision history for this message
gottelt (gottelt) said :
#2

Hi Jaap,
thank you very much for your quick answer. I managed to adapt the ZeroFiveEight.html according to my needs.

As a suggestion: It would be nice if all templates could have a similar structure and some advisory comments. This would help newbees in css/html to create their own export styles based the ones shipped with zim.

Thanks again for your great work!
Friedrich

Revision history for this message
Leoandry (henry-andry) said :
#3

It seems like there might be changes in the way Zim handles links or templates between versions. To fix this issue, you can try the following steps:

Review Zim Documentation: Check the release notes or documentation for the specific changes in link syntax or template usage between the versions you've mentioned. Zim's official documentation or community forums could provide insights into any updates or modifications.

Adjust Template: If there are changes in the template syntax, update your template accordingly. In your case, it seems the link format has changed from "./Folder/SubFolder/file.html" to "#Folder:SubFolder:File/". Modify your template to generate links in the new format.

For example, if your template currently has:
Testing: After updating the template, test the HTML export again. Ensure that the links generated in the exported HTML files are now correct and functional.

Community Support: If you encounter difficulties or have specific questions about the changes, consider reaching out to the Zim community through forums or mailing lists. Other users or developers may provide additional insights or solutions.