Skip to content
Grav 2.0 is officially stable. Read the announcement →

Muut Archive Legend

@Muut · Joined 9 years ago · 18337 posts · 3878 topics · 137 reputation

Badges

✏️ First Post 💬 Conversation Starter ❤️ Well Liked

Recent posts

  • Creating Helper Function · 11 years ago

    Thanks. Now I've got it! Passing in the config variable did it ! Thanks.

  • Creating Helper Function · 11 years ago

    Ok, there are more problems. First use config.brain.adjectives instead of config.brain.properties. Second pass the config variable to the macro, since a macro lives in its own scope. Tested with the b

  • Creating Helper Function · 11 years ago

    i'm sorry, this is not the solution to the problem .... :( still doesn't work !

  • Creating Helper Function · 11 years ago

    Well, let me guess. You get as output something like "Einen 134561e Nacht!"? This is because hour is a string (obviously date returns a string). You have to cast it into a number. See my snippet above

  • Creating Helper Function · 11 years ago

    Oh well, still not finished... (base.html.twig) {% import "macros/macros.html.twig" as m %} <div class="flex-container" id="header"> <div class="flex-box"> {{ m.hour_based_greeting()

  • Creating Helper Function · 11 years ago

    now the random function works just fine, there was a problem with my installation of GRAV ! {{ random(config.brain.properties) }} ---

  • Creating Helper Function · 11 years ago

    I gonna reset my installation of grav.

  • Creating Helper Function · 11 years ago

    maybe grav has a problem finding and rendering my yaml files ?!?!?!?!

  • Creating Helper Function · 11 years ago

    my yaml file "config/brain.yaml" adjectives: - "wunderschön" - "angenehm" - "wohltuend" ---

  • Creating Helper Function · 11 years ago

    empty. you're right. :(