Author Topic: Hide a whole page in D&P works not, although it does hide containers  (Read 286 times)

sinus

  • Global Moderator
  • *****
  • Posts: 4707
  • IMatch-User since 2001 (IMatch 3.6)
In the help-file of IMatch there are some good tips for D&P, see attachements.

We can hide containers or pages with a special hidden-field.
Is there a 1, then it is hidden, else it is shown.

I use e.g. these variables to hide containers:

{Print.Property.unsichtbar|numcomp:eq,1,false,true}
{Print.Property.unsichtbar|is:1,0,1}
{Print.Group.Index|is:1,0,1}


This works very good, all 3 of them. I created a "document variable" calls unsichtbar, and if I change the value on 1, then all containers will be not more printed at one, very cool.
Now I have thought, I could do the same to hide some pages (pages of index).

For a whole page we have also a hidden field. But curiously works for a page only the last variable: {Print.Group.Index|is:1,0,1}. This works fine, the others works not.

If I create a page and some containers on exact the same page, the same variable works for containers, but works not for the whole page.

I tried really a lot, it does simply not work.

Is this now a glitch or by design, that this does not work?


BTW: this is not very important, but you can imagine, it would be really cool, to change the value of one single variable, and at once 10 pages or so are hidden.
Would be really helpful. @Mario: as always: if this is a glitch with a lot of work, simply let it be  8)

« Last Edit: May 27, 2022, 06:01:54 PM by sinus »
Best wishes from Switzerland! :-)
Markus

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 31554
I have not worked on the D&P code for a very long time.
I don't recall the details anymore. D&P is such a rarely used tool, and variable trickeries to dynamically hide pages is surely something not many users would ever do.

Maybe variables are not supported for pages? I don't know.
If you consider this to be a bug and I should look into this, let me know and I will move this into bug reports. Or you can move it yourself.

sinus

  • Global Moderator
  • *****
  • Posts: 4707
  • IMatch-User since 2001 (IMatch 3.6)
I have not worked on the D&P code for a very long time.
I don't recall the details anymore. D&P is such a rarely used tool, and variable trickeries to dynamically hide pages is surely something not many users would ever do.

Maybe variables are not supported for pages? I don't know.
If you consider this to be a bug and I should look into this, let me know and I will move this into bug reports. Or you can move it yourself.

Thanks, Mario
You are for sure correct, that this does not a lot of users use.
Nevertheless it would be super, if this would work.
As I wrote above at least this variable {Print.Group.Index|is:1,0,1} works and you have also written in the help-pages, that variables would work.

But I can not imagine, how much time something like this would mean.
If it is a lot of work, then please let it be.

If you think, ok, one of the next time, when you have time  ;D 8) that you could have a look, then it please move it in the bug-section (ich wage das nicht selbst zu machen).


Best wishes from Switzerland! :-)
Markus

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 31554
According to telemetry, D&P is one of the least used features in IMatch.

Is it correct to summarize your initial post as: Hiding a page via a variable does not work if that variable is based on a user-defined property?

Have you tried

{Print.Property.unsichtbar|numcomp:eq,1,0,1}

that should work. You use 0 and 1 in your other variables, not false and true.

I shall then move this to bug reports.

« Last Edit: May 27, 2022, 07:00:05 PM by Mario »

sinus

  • Global Moderator
  • *****
  • Posts: 4707
  • IMatch-User since 2001 (IMatch 3.6)
According to telemetry, D&P is one of the least used features in IMatch.

Is it correct to summarize your initial post as: Hiding a page via a variable does not work if that variable is based on a user-defined property?

Yes, you summarize my post totally correct.

Have you tried

{Print.Property.unsichtbar|numcomp:eq,1,0,1}

that should work. You use 0 and 1 in your other variables, not false and true.

I shall then move this to bug reports.

Yes, I tried a lot, with 0 and 1, true and false.

Just now I tried your variable
{Print.Property.unsichtbar|numcomp:eq,1,0,1}

I create a new page, add a text-container, and put this variable in the container AND in the hidden-field for the page.
The page does always show up, but the container works perfect.

Means, the variable works with containers, but not on the whole page. 
Best wishes from Switzerland! :-)
Markus

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 31554
I will look into this at some point in the future.
D&P is a very rarely used feature, and hiding pages based on variables based on a user-defined property is probably something only you have ever attempted.
So, this gets a rather low priority in my to-do list, I'm afraid.

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 31554
I have created a document variable:

hide=1

and then used this to hide the page:

{Print.Property.hide}

works. It also works when I set the document property to

hide=true

The only problem I could find was that the preview sometimes was not refreshed, because the logic determines that nothing with the pages has changed, and hence they are not re-rendered.
Doing a small change on a page or a container did the trick and the page was hidden or shown, depending on the variable.
This is a glitch and I will look into this for a later update.

sinus

  • Global Moderator
  • *****
  • Posts: 4707
  • IMatch-User since 2001 (IMatch 3.6)
...

The only problem I could find was that the preview sometimes was not refreshed, because the logic determines that nothing with the pages has changed, and hence they are not re-rendered.
Doing a small change on a page or a container did the trick and the page was hidden or shown, depending on the variable.
This is a glitch and I will look into this for a later update.

Ha!
You solved it!!

Thanks a lot, really. For me this is solved.
It was this refresh-thing. To refresh usually I go into the preview and go a page back or forth and this does the refresh.
But obviously not in this case.
We have to change something small on a page, as you pointed out, and then it refreshes.

Ha, super. Cool, this gives me good possibilities (and work for the weekend).
For example hide some help-sides in the pdf or not and simly with changing one number (1 or 0). Simply cool.

And, btw, on the idea to use only the variable, not with numcomp or is, I came not. This is logical and even simpler. But all works not, with this refresh-thing.

Thanks again, Mario, you made my day!
Best wishes from Switzerland! :-)
Markus

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 31554
The "hidden" just checks if the variable resolves to a Boolean.
Allowed are 1,true,yes and 0,false,no

ubacher

  • Oldtimer
  • ****
  • Posts: 2521
This question triggered my interest in D&P again and I tried various things.

What I don't understand is the defining of print variables.
Mario says:
Quote
I have created a document variable:

hide=1


How is this done?

I also tried the dynamic system template Dynamic Portfolio A4 which starts with displaying {Print.Property.Title}.
How do I fill this variable?
I did not find this in the help file.

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 31554
Re: Hide a whole page in D&P works not, although it does hide containers
« Reply #10 on: May 29, 2022, 11:18:18 AM »
Click on the document in the tree on the left. Then see Document Variables
All print variables are listed in the help: IMatch Printing Variables

sinus

  • Global Moderator
  • *****
  • Posts: 4707
  • IMatch-User since 2001 (IMatch 3.6)
Re: Hide a whole page in D&P works not, although it does hide containers
« Reply #11 on: May 29, 2022, 01:23:27 PM »
This question triggered my interest in D&P again and I tried various things.


very good  ;D

It is like Mario wrote, you must add some variables (or only one) into the documents variables.
see attachements.

With this hide-thing you can do a lot.

If you have e.g. a book, you can add some intern remarks only for a group of people, who are interested into deep informations.
For others, who do not want read a lot, you can then hide all these pages "auf einen Schlag".
Very cool.

You can also hide containers!!
With this I do a lot of things, because you can e.g. add two containers on each, and, depends on a file or on groups or what else, you can hide the top container or vice versa.

Design&Print is very good.
If you use dynamic templates and adds also variables, you can do a lot more, at least this is my experience.

I like InDesign, but if I work with text AND a lot of images, I can do things, what I could not do with the adobe-product.
(maybe experts like Jingo could, but nevertheless I doubt it, because D&P is specialized for text and images. If you speak only from text, of course InDesign, Corel or whatever is more sophisticated).
Best wishes from Switzerland! :-)
Markus

ubacher

  • Oldtimer
  • ****
  • Posts: 2521
Re: Hide a whole page in D&P works not, although it does hide containers
« Reply #12 on: May 29, 2022, 02:30:42 PM »
Thanks. I did search HELP for Document Variables but in the wrong section
(I searched under Dynamic Template).

Maybe when searching for variables it would help to list the various variables in Imatch:

Application variables: globally available, set in preferences
Attribute variables: Associated with files, Set in preferences->edit attributes.
Print variables: Automatically set by D&P
Document variables: manually set in the Document Template/Properties.