The native mobile app allows us to control screen layout setting via 2 Core API
API Route: /core/app-settings?access_token=token
This API register all apps to the Native Mobile App. Implement getAppSetting in PostApi and getMobileSettings method in PostResource & PostCategoryResource classes
PostApi.php Expand source
<?php
class PostApi extends AbstractResourceApi implements ActivityFeedInterface, MobileAppSettingInterface
{
/.../
/**
Item |
Type |
Description |
setting.resources |
Object |
The setting of each resource supported by the new Post app |
setting.screens |
Object |
Screen Setting for the new app |
setting.parameters |
Object |
Other parameters |
Resource setting |
Type |
Description |
post.acl |
Object |
Control permission of the current user for the app |
post.add.icon |
string |
Create a post button Icon |
post.add.label |
string |
Create a post button label |
post.search_input |
object |
Setting for search form in Post App |
post.search_input.placeHolder |
string |
Place Holder display on the app |
post.resource_name |
string |
Name of resource |
post.forms |
object |
Define API to get the form to create & edit |
post.forms.addItem |
object |
Define apiUrl & headerTitle for the Add form |
post.forms.editItem |
object |
Define apiUrl & headerTitle for the Edit form |
post.list_view |
object |
Define layout component & information used to render layout on mobile app |
post.detail_view |
object |
Define layout component used to render layout on detail resource listing |
post.feed_view |
object |
Define feed attachment layout on App, with 2 property: |
token
Parameter |
Type |
Description |
screen.home |
object |
Define Home screen of the app |
screen.home.headerTitle |
string |
|
screen.home.header_buttons |
object |
List of button display on the Home Screen |
screen.home.header_menu |
object |
|
screen.home.header_menu.config_name |
|
|
screen.home.header_menu.action |
|
|
screen.home.default |
|
|
screen.home.default.parent |
|
|
screen.home.default.category_layout |
|
|
screen.app.header_menu |
|
|
Page Name |
Screen ID |
Module Home Page |
module |
Module Detail Page |
detail |
Module Search Page |
listing |
Section Name |
Description |
Section ID |
Location Top |
Section on top |
top |
Location Bottom |
Section on bottom |
bottom |
Location Main |
The main content of the page |
content |
Location Header |
Header of page |
header |
Location Right |
Right block and show on a tablet only |
right |
Key |
Description |
component |
Component name of the block, this value should be: |
title |
Block title |
resource_name |
Resource name will be used to fetch item and define which view will be used to show item |
module_name |
Module name |
query (optional) |
Extra query for API of this block, the block will call API: |
limit (optional) |
Default 4, defined how many items show on the block |
Component Name |
Description / Render |
Recommend section |
Supported parameter |
Note |
module_header |
The Header section for module home page |
header |
|
simple_header |
The Header section for listing page |
header |
|
stream_profile_feeds |
List of feed items related to the current module |
content |
embedComponent contains other child components |
None |
smart_resource_list |
List of items related to current module (no separation) |
content |
embedComponent contains other child components |
Items type controlled by Core App Setting API |
smart_resource_section |
List of items related to current module (separated by section) |
content |
|
smart_tabs |
List of items related to current module (separated by tab component) |
content |
|
sort_filter_fab |
A floating block contains sort & filter button |
mainBottom |
None |
None |
|
|
|
|
|
Component Name |
Description / Render |
Recommend section |
Supported parameter |
Note |
item_header |
The header section for module detail page |
header |
|
feed_header |
Header for feed detail page |
header |
None |
This is a special type of header, only use for feed detail |
item_simple_detail |
Wrapper block for other item's component |
content |
embedComponent contains other child components |
None |
feed_detail |
Detail of current feed item |
content |
embedComponent contains other child components |
None |
stream_profile_description |
Information block of the current item ( short description location, category) |
embedComponent |
None |
None |
stream_profile_menus |
Menu bar for the current item |
embedComponent |
None |
Only use for profile item Ex. (User, Pages, Groups, ....) |
stream_profile_photos |
Photo block for the current item |
embedComponent |
None |
None |
stream_composer |
Post Status, Composer block |
embedComponent |
None |
None |
item_image |
Image field of this item |
embedComponent |
None |
None |
item_title |
Title field of this item |
embedComponent |
None |
None |
item_pricing |
Price field of this item |
embedComponent |
None |
None |
item_author |
Author (created user) field of this item |
embedComponent |
None |
None |
item_stats |
Statistic field of this item |
embedComponent |
stats: Object |
Ex: |
item_pending |
Message block if this item is pending |
embedComponent |
message: the message will show in the center of the block |
None |
item_description |
Short description (non-HTML) field of this item |
embedComponent |
None |
None |
item_html_content |
Full description (both HTML or non-HTML) field of this item |
embedComponent |
None |
None |
item_separator |
Separate current item_simple_detail |
embedComponent |
None |
None |
item_category |
Category field of this item |
embedComponent |
None |
None |
item_genre |
Genre field of this item |
embedComponent |
None |
None |
item_tags |
Tags field of this item |
embedComponent |
None |
None |
item_user_tags |
User tags field of this item |
embedComponent |
None |
None |
item_location |
Location field of this item |
embedComponent |
None |
None |
item_video |
Video field of this item |
embedComponent |
None |
None |
item_like_bar |
Like, Comment, Share bar for this item |
bottom |
None |
None |
.... |
|
|
|
|
Component Name |
Description / Render |
Available section |
Supported parameter |
banner_ad |
Admob Banner |
|
simple_list_block |
List of limit items basing on parameters |
|
|
|
|
|
Component Name |
Apply For Page |
Description / Render |
Available section |
Supported parameter |
stream_user_header_info |
User detail |
Top section of User page (Cover, Avatar, some specific information) |
embedComponent |
None |
stream_event_header_info |
Event detail |
Top section of Event page (Cover, Title, author) |
embedComponent |
None |
stream_pages_header_info |
Pages detail |
Top section of Pages page (Cover, Avatar, some specific information) |
embedComponent |
None |
stream_groups_header_info |
Groups detail |
Top section of Groups page (Cover, Avatar, some specific information) |
embedComponent |
None |
|
|
|
|
|