[luci] Error when trying to create a new tab

Tek Wiz tx2023 at gmail.com
Tue Dec 10 03:51:34 CET 2013


Yes! I got it to work.

I did a
*make package/feeds/luci/luci/clean*
in openwrt/

Then I edited my files to:
helloworld.htm:
<%+header%>
<h2>*<a id="content" name="content">*<%:Hello World%>*</a>*</h2>
<%+footer%>

mymodule.lua:
module("luci.controller.myapp.mymodule", package.seeall)

function index()
    entry({"click", "here", "now"}, call("action_tryme"), _("Click here"),
10).dependent=false
    entry({"my", "new", "template"},
template("myapp-mymodule/helloworld"), *_("Hello
world")*, 20).dependent=false
end

function action_tryme()
    luci.http.prepare_content("text/plain")
    luci.http.write("Haha, rebooting now...")
    luci.sys.reboot()
end


Don't know what did the trick but it's working now.

Thanks


On Mon, Dec 9, 2013 at 6:44 PM, Tek Wiz <tx2023 at gmail.com> wrote:

> My file is helloworld.htm:
>
> <%+header%>
> <h1><%:Hello World%></h1>
> <%+footer%>
>
> And mymodule.lua:
>
> module("luci.controller.myapp.mymodule", package.seeall)
>
> function index()
>     entry({"click", "here", "now"}, call("action_tryme"), "Click here",
> 10).dependent=false
>     entry({"my", "new", "template"},
> template("myapp-mymodule/helloworld"), "Hello world", 20).dependent=false
> end
>
> function action_tryme()
>     luci.http.prepare_content("text/plain")
>     luci.http.write("Haha, rebooting now...")
>     luci.sys.reboot()
> end
>
>
> just like in the web page documentation:
> http://luci.subsignal.org/trac/wiki/Documentation/ModulesHowTo
> So what syntax error could it be?
>
> Thanks
>
>
>
> On Mon, Dec 9, 2013 at 7:35 PM, Jo-Philipp Wich <xm at subsignal.org> wrote:
>
>> Hi.
>>
>> You have a syntax error in your template.
>>
>> ~ Jow
>>
>>
>> _______________________________________________
>> luci mailing list
>> luci at lists.subsignal.org
>> https://lists.subsignal.org/mailman/listinfo/luci
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsignal.org/pipermail/luci/attachments/20131210/0c57d56c/attachment.html>


More information about the luci mailing list