Zim

Is there a way to configure own template for a given namespace in Zim?

Asked by Waldemar Zurowski

I found a wishlist #333204 which relates to this question, but it doesn't really solve the problem.

I'd like to have a namespace XXX, which would always use a template YYY to create a new page. I can see from the Zim code the framework is already there and Calendar plugin in fact uses it, however I cannot find if it is possible to configure that with some configuration file.

I use Zim version 0.47

Best regards,
  Waldemar

Question information

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

That would be bug report https://bugs.launchpad.net/zim/+bug/333204
You are right that the code is there to support templates per
namespace, but the UI to configure them is missing. Maybe you can
describe / photoshop a suggestion how the interface should look, both
for creating & editing templates, and for binding the templates to a
namespace. Having a proposal how to do it exactly usually speeds up
implementing it.

The only thing you can do now is change the template for all pages,
but not per namespace.

-- Jaap

On Thu, Oct 21, 2010 at 4:02 PM, Waldemar Zurowski
<email address hidden> wrote:
> New question #130549 on Zim:
> https://answers.launchpad.net/zim/+question/130549
>
> I found a wishlist #333204 which relates to this question, but it doesn't really solve the problem.
>
> I'd like to have a namespace XXX, which would always use a template YYY to create a new page. I can see from the Zim code the framework is already there and Calendar plugin in fact uses it, however I cannot find if it is possible to configure that with some configuration file.
>
> I use Zim version 0.47
>
> Best regards,
>  Waldemar
>
> --
> You received this question notification because you are an answer
> contact for Zim.
>

Revision history for this message
Waldemar Zurowski (waldemar-zurowski) said :
#2

Hi Jaap,

Thank you for you prompt reply. Actually I asked more about current status of the implementation, than to push the implementation forward.

I saw in the notebook class code it holds notebook_properties object, and that supports a template for each namespace. What I cannot see, how and if this notebook_properties object is stored in a configuration file. As I'm not a UI designer, I cannot help with any UI suggestion. However I can try to help with the design how to store notebook_properties.

Best regards,
  Waldemar

Revision history for this message
Best Jaap Karssenberg (jaap.karssenberg) said :
#3

On Thu, Oct 21, 2010 at 5:27 PM, Waldemar Zurowski
<email address hidden> wrote:
> I saw in the notebook class code it holds notebook_properties object,
> and that supports a template for each namespace. What I cannot see, how
> and if this notebook_properties object is stored in a configuration
> file.

I isn't - only the calendar plugin uses it at the moment, and the
plugin registers it each time on initialization.

> As I'm not a UI designer, I cannot help with any UI suggestion.
> However I can try to help with the design how to store
> notebook_properties.

Configuration is pretty much covered by the INI style config defined
in zim/config.py. We can easily map any dict structure to a config
file when needed.

-- Jaap

Revision history for this message
Waldemar Zurowski (waldemar-zurowski) said :
#4

Thanks Jaap Karssenberg, that solved my question.