Removed config.title, added title(); cosmetic
authorTimm S. Mueller <tmueller@neoscientists.org>
Mon, 12 Feb 2007 22:06:21 +0100
changeset 85ce41f25139f
parent 6 dac2ae58fade
child 9 ca5cc498e544
Removed config.title, added title(); cosmetic
cgi-bin/loona.lua
htdocs/loona.lua
     1.1 --- a/cgi-bin/loona.lua	Mon Feb 12 21:06:58 2007 +0100
     1.2 +++ b/cgi-bin/loona.lua	Mon Feb 12 22:06:21 2007 +0100
     1.3 @@ -273,6 +273,13 @@
     1.4  -------------------------------------------------------------------------------
     1.5  
     1.6  
     1.7 +--	Produce page title
     1.8 +
     1.9 +function title()
    1.10 +	return section and (section.title or section.label or section.name) or ""
    1.11 +end
    1.12 +
    1.13 +
    1.14  --	Return locale string
    1.15  
    1.16  function loc(s)
    1.17 @@ -696,7 +703,6 @@
    1.18  --	load configuration
    1.19  
    1.20  config = source("../etc/config.lua") or { }
    1.21 -config.title = config.title or "Loona CMS"
    1.22  config.localedir = posix.abspath(config.localedir or "../locale")
    1.23  config.contentdir = posix.abspath(config.contentdir or "../content")
    1.24  config.sessiondir = posix.abspath(config.sessiondir or "../var/sessions")
     2.1 --- a/htdocs/loona.lua	Mon Feb 12 21:06:58 2007 +0100
     2.2 +++ b/htdocs/loona.lua	Mon Feb 12 22:06:21 2007 +0100
     2.3 @@ -29,7 +29,7 @@
     2.4  					<%for _, val in ipairs(entries) do
     2.5  						if not val.notvisible then
     2.6  							local curpath = (menupath and menupath .. "/" .. val.name) or val.name
     2.7 -							local label = (val.label ~= "" and val.label) or val.name%>
     2.8 +							local label = val.label or val.name%>
     2.9  							<li>
    2.10  								<%if activename == val.name then%>
    2.11  									<%=MALINK(curpath, label, val.action)%>
    2.12 @@ -53,7 +53,8 @@
    2.13  loona.setheader "Content-Type: text/html; charset=utf-8\n\n"
    2.14  %>
    2.15  <?xml version="1.0"?>
    2.16 -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    2.17 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    2.18 +	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    2.19  
    2.20  <html xmlns="http://www.w3.org/1999/xhtml" lang="<%=loona.lang%>">
    2.21  	
    2.22 @@ -61,8 +62,7 @@
    2.23  	<link rel="stylesheet" type="text/css" href='/loona.css' />
    2.24  	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
    2.25  	<title>
    2.26 -		Loona CMS
    2.27 -		<%=loona.section and (": " .. (loona.section.title or loona.section.label or loona.section.name))%>
    2.28 +		Loona CMS : <%=loona.title()%>
    2.29  	</title>
    2.30  </head>
    2.31