How enGap works for ELGGenGap is HTML5 based mobile application.So whatever you see in the app is HTML5 pages. and the twist here is that this pages are downloaded from your website. The data is retrieved via webservice call to your website.
This webservies are defined in mod/engap/start.php of the enGap plugin.The pages and templates are present in mod/engap/views/engap/ folder.
enGap is also using onsen ui, and angularjs.
Minimum Load on serverViews images,and data/entity are also cached in the mobile application. So this mobile app will also work in offline mode
We have taken special care to keep interaction with server as low as possible, and maximum utilisation comes from cached data,even when internet is present. When data comes from server, we do not force user to wait for it. in fact user dont even know that when data is updated.
index.phpmod/engap/views/engap/index.php is the main page of your application after users logs in. Here you can add and remove tabs at bottom. The content of each tabs can either be defined in same index.php as ons-template (like home). or can be defined in separate php file. Like group.php,members.php,more.php.
entity templatemod/engap/views/engap/entity folder contains the template(listview) for required ELGG entities. right now we added template for group and user. and you can add more entities over there. each entity contains two PHP file. list.php contains the template for one item on a list of that type of entities.full.php contains the full page view of a given entity.
page cachingall the pages which were demanded without query params, are not cached. All the list templates i.e entity\type\subtype\list.php are cached all the pages availabe at root level i.e views\default\engap\index.php are cached
You can modify the layout and structure of cached page anytime on server. and we made the app such that you don't even need to resubmit the app to App Store.The app caching can be forced to cleanup just by changing one version variable.
special directiveSpecial directive are like html tags. and their special presentation is implemented in the mobile app.
newsfeedThis is the list of all river items related to users friends.
<newsfeed limit="11" ></newsfeed>
elggentityShow one entity of given guid.The template used is mod/views/engap/entity/type/subtype/list.php.
elggentitylistIt list all the entities of given type and given subtype. The template used is mod/views/engap/entity/type/subtype/full.php.
<elggentitylist type="object" subtype="event" limit="9"></elggentitylist>
sidebarUsing this tag you show a content in a uniques slidein page. and this way you can converts elgg sidebar of each webpage into slide pages too.You need to add a button in ons-toolbar as follow
<ons-icon icon="ion-navicon-round" onclick="sidebar();"></ons-icon>
timelineThis is the list of all river items related to user.
<timeline extra="entity_guid" limit="11"></timeline>