Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explain how to conditionally display a page in the doc #45

Open
sametmax opened this issue Aug 30, 2017 · 6 comments
Open

Explain how to conditionally display a page in the doc #45

sametmax opened this issue Aug 30, 2017 · 6 comments

Comments

@sametmax
Copy link

I have a document that may include a page or not. This page is using a different page style.

Right now I'm trying to do:

{% if condition %} <= this is at the beginning on the optional page
Optional page content
<Page break>
{% endif %} <= this is at the beginning on the next page

It partially works as the content is conditionally inserted. However, it's not inserted in a separate page, and the custom page style is lost.

@sametmax
Copy link
Author

sametmax commented Aug 30, 2017

I've tried with different configurations, and actually it does work, only not when it's the first page that is optional.

@christopher-ramirez
Copy link
Owner

Well this is something I've never tried. Let me have a look into in.

@christopher-ramirez
Copy link
Owner

I've quickly tried a blank document, with its second page wrapped inside a condition. The technique:

{% if condition %} <= Before optional page
<Page break>
Optional page content
<Page break>
{% endif %} <= this is at the beginning on the next page

Hope this helps.

@sametmax
Copy link
Author

sametmax commented Sep 6, 2017

As I said, it does work. But not for the First page with a set page style.

@christopher-ramirez
Copy link
Owner

Sorry! I didn't catch that

Right now it should not be possible to set the fist page as optional because there is where someone starts with the document.

I occurs to me that a solution would be introducing a new manual Control Flow reference which internally move the conditional block tag before/after the optional page.

@sametmax
Copy link
Author

sametmax commented Sep 7, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants