Bookpedia : template's customization

Any trouble you encounter with the Pedias, here's the place to ask for help.
Post Reply
Izzy
Addicted to Bruji
Addicted to Bruji
Posts: 29
Joined: Wed Oct 17, 2012 11:35 am

Bookpedia : template's customization

Post by Izzy »

Hello,

I try to do something on which I can't find infos on the forum or in the program's help either.

For more visibility, I insert global titles which includes several fields in my template (for example : subject, summary, comments, notes). The global titles aren't linked to those fields. So if nothing is inserted in that fields, I just have the global titles.

Is there a way :
- to add the condition to hide the global title if there is no fields filled. Maybe with the condition already done for the empty fields. Or,
- to show, in the template, all the fields even if they are empty. Like it is the case for the add/modify window :
From help :
In addition, the Add/Edit window lets you toggle between only showing fields that hold information or showing all fields, including blank ones by pressing the 'Show All' or 'Hide All' button at the bottom of the window.
I hope that I explain clearly what I'm looking for.

Thank you.
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Bookpedia : template's customization

Post by Conor »

Add the condition to hide the global title if there is no fields filled. Maybe with the condition already done for the empty fields.
HTML is not good at nesting comments, neither is the Pedia template system. So although fields can be stripped when not set, if you start nesting them you end up with edge cases that are not the results that you want.

Code: Select all

<!--IFsubjects   <!--IFsummary  [key:subjects] -- [key:summary]  ENDsummary-->  ENDsubjects-->
Although incorrect HTML (with the nested comments) the template system will fix it, but it does mean summary will never be displayed if there are no comments as everything nested inside is removed if no comments. In short answer there is no OR conditional for selectively displaying fields.
to show, in the template, all the fields even if they are empty
Add all the tags without conditionals, to always display them.

Code: Select all

summary: [key:summary] <br/>
subjects: [key:subjects] <br/>
comments: [key:comments] <br/>
Izzy
Addicted to Bruji
Addicted to Bruji
Posts: 29
Joined: Wed Oct 17, 2012 11:35 am

Re: Bookpedia : template's customization

Post by Izzy »

Thank you. I choose to display all.
Post Reply