Muut Archive Legend
@Muut · Joined 9 years ago · 18337 posts · 3878 topics · 137 reputation
Badges
Recent posts
-
Hiding parts of pages
· 10 years ago
I imagine the solution rhukster specified above could be used as a shortcode by extending the shortcode-plugin, so you could for example do: [private=super]This content is only visible to admins with
-
Hiding parts of pages
· 10 years ago
Thanks! That solved my problem perfectly. Not that I need it right now but Gingah made me curious on the markdown approach. How would that be done?
-
Hiding parts of pages
· 10 years ago
You can restrict portions of you templates or even your page content (with process: twig: true in the page header with: {% if grav.user.authorize('site.secret') %} [color=red]This is strictly control
-
Hiding parts of pages
· 10 years ago
In Twig that would work if logged_inwas set to true (and the statement was closed by endif). Are you thinking of protecting content in the Markdown, or in Twig?
-
Hiding parts of pages
· 10 years ago
Can I hide or protect parts of page (or a modular page) that is accessible for everyone? Content open for every visitor to read {% if logged_in %}except for this classified string of text here {% end
-
Generate select options in a form
· 10 years ago
It just needs to return a PHP array in a name/value format. e.g. $options = [ 'option-a' => 'Option A', 'option-b' => 'Option B' ]; return $options; ---
-
Generate select options in a form
· 10 years ago
Hi, thank you a lot for your answer, I will look into this. What would the function look like? I understand how to call it, but not exactly how to write it.
-
Generate select options in a form
· 10 years ago
There's no way to do what you are trying to do. The problem is that even if you enable Twig processing in frontmatter: pages: frontmatter: process_twig: true (in system.yaml), when that runs the coll
-
Generate select options in a form
· 10 years ago
Nevermind for the Invalid, it was something else. It does save, but the selector is empty.
-
Generate select options in a form
· 10 years ago
Hello. I am trying to get a dynamic list of subpages in a form <select> field. Here’s an extract of what I’m trying to write in the frontmatter: content: items: @self.children form: name