Kontent Days 36-37: Settings

brentdax on 2005-08-08T20:17:12

So, the settings system is in. That means a lot of Cool Things are now possible which previously weren't. Three screenshots:

First, the Kategory page containing all the settings. You can create a new setting by clicking the "Create" button up top. (And yes, I changed the template somewhat.)

Second, the site_name setting, which defines the text at the top of the page. Note that each setting includes a bit of documentation.

Third, the html_template setting, which contains the code used by the HTML renderer. A tricky little bit of code:

	my $template=WWW::Kontent::setting("html_template");
	
	#This treats $template as a double-quoted string with nulls as delimiters.
	return eval "qq\0$template\0";


Allows html_template to be treated exactly like a Perl 6 qq string.

Of course, it's also a nice big security hole, which means I can't release again until I have a user system to authenticate admins and an access control system to keep non-admins out. And the access control system requires that I write Magic, the hook system...