Home Forums Particles Support How can I access page header variables from JL gantry particles in Grav CMS?

Viewing 2 posts - 1 through 2 (of 2 total)

  • franktoo
    Subscriber

    Hi, in Grav CMS I am used to access page header variables via twig from anywhere.

    For example, if I have the following in my markdown page header:

    title: 'MYTITLE'
    process:
        markdown: true
        twig: true
    twig_first: true
    foo:
        bar: 'foobar'

    Then I can use it anywhere on the markdown page and for example in the CustomHTML particle (with activated twig processing).

    {{ page.title }}
    Results in MYTITLE

    {{ page.header.foo.bar }}
    Results in foobar.

    How can I access those variable values from within Joomlead Gantry Particles?

    Background is: I want to create an outline and assign it to multiple markdown pages. My intention is to define variables per page (e.g. different telefon numbers) and then use these variables from within the particle config. So I have exactly one outline displaying different pages based on their variables in the markdown page header.


    Tony
    Moderator

    At the moment our particles are not support process twig or shortcode, we will consider about that.
    Which particle you wish to implement the markdown ?

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

JoomLead Gantry5 Particles 2.2.10 released, new features, bug fixes and more Learn more
Flash Sale. Get Up to 25% Off - Coupon: FLASH25 Shop Now