Hi
totally newbie for openwrt, need help
with reference to below link able to add the menu with sub tabs.
http://wiki.openwrt.org/doc/devel/luci
entry({"admin", "new_tab"}, firstchild(), "New tab", 30).dependent=false
entry({"admin", "new_tab", "tab_from_cbi"}, cbi("myapp-mymodule/cbi_tab"), "CBI Tab", 1)
entry({"admin", "new_tab", "tab_from_view"}, template("myapp-mymodule/view_tab"), "View Tab", 2)
Once added this code with no efforts getting displayed the tab(new_tab) in web GUI.
added view_tab.htm in the desired folder structure (<luci-path>/luci-myapplication/view/myapp-mymodule/view_tab.htm)
view_tab.htm contains default of my application header and footer. ( <%+header%><%+footer%> )
Once I click on the view_tab under menu.. throwing the error in dispatcher.lua like below :
/usr/lib/lua/luci/dispatcher.lua:449: Failed to execute template dispatcher target for entry '/admin/new_tab/tab_from_view'.
The called action terminated with an exception:
/usr/lib/lua/luci/template.lua:81: Failed to load template 'myapp/view_tab'.
Error while parsing template '/usr/lib/lua/luci/view/myapp/view_tab.htm'.
A syntax error occured near 'write("
\n")'.
stack traceback:
[C]: in function 'assert'
/usr/lib/lua/luci/dispatcher.lua:449: in function 'dispatch'
/usr/lib/lua/luci/dispatcher.lua:195: in function </usr/lib/lua/luci/dispatcher.lua:194>
I guess simply adding the template and giving entry wont enough to get display the template in web GUI.
pelase help me out here how to parse the template in lua application.... able to add .lua template in the desired reference link failed in .htm ):