sailorproject / sailor

A Lua MVC Web Framework.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Suggestion: Add a debug variable in the object Page

xspager opened this issue · comments

Might be useful to have a debug variable on the object Page so the template could decide to include or not a block of script like Google Analytic for example.

No, just value true or false I can use on a template to decide to include or not on the html the google analytics script.

I see, you could add it at conf/confmaybe. We already have a debug.inspect field. As it's we only use it for inspect, maybe we should replace this for a simpler thing? Remove inspect and have debug only?

Then at the views you can
local debug = require"conf.conf".debug

Would this be accessible on the view?

Yes

2016-04-20 17:53 GMT+02:00 Daniel Lemos notifications@github.com:

Would this be accessible on the view?


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#116 (comment)

Etiene Dalcol

Software Engineering student at ENSTA Bretagne and PUC-Rio
Sailor Developer http://sailorproject.org
Lua Ladies Founder http://lualadies.org

Oh, sorry, let me try again... Yes, conf.lua is the right place to this value. debug.inspect is very useful this would be something extra.