Re: Using document attributes in section.html.slim

Posted by mojavelinux on
URL: https://discuss.asciidoctor.org/Using-document-attributes-in-section-html-slim-tp7481p7485.html

You got it!

In your first example, you are requesting the attribute on the block, not the document.

If you ever want it to check the block, then the document if it's not on the block, you have to tell it to keep searching upwards:

#{attr :revnumber, nil, true}

Best,

-Dan

On Thu, Jan 9, 2020 at 2:21 AM phgiraud [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Just figured out how to get document attributes:

#{document.attr :revnumber}


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/Using-document-attributes-in-section-html-slim-tp7481p7484.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux