Skip to content
This repository has been archived by the owner on Jul 22, 2018. It is now read-only.

Concept

Abdullah Marax edited this page Nov 1, 2016 · 9 revisions

####Understanding core concept

You will get three different instances of plekan object.

  1. plekan
  2. plekanComponentMixin
  3. plekanModules
  • pelkan : This object contains core code for working of plekan.
  • plekanModules : It's came with plekan being include module list. If you want to filter this object.

Note : Size not effected by filter.

  • plekanComponentMixin : In some cases you want to write to custom components outside plekanModules . You can use this object.

plekanComponentMixin give you a many magic properties for component.

  • store -> global store
  • index -> index of row
  • displayLanguage -> current language
  • me -> return row

You can use this variables for only access the me.contents.fields object.

We will use the variables for writing a custom component Example

See detail code


####Row Object

[
 {
   "name": "slider",
   "group": "photos",
   "thumbnail": "slidet-thumbnail.png",
   "contents": {
     "tr": {
       "html": <String>,
       "fields": <Object>
     },
     "en": {
       "html": <String>,
       "fields": <Object>
     },
     ...
   "index": "2d89be50-914d-11e6-998c-5f394fa01a63"
 },
 ...
]

Each row that has been generated by plekan looks like this. ( equivalent to each row on screen ) Content of objects :

  • name: Module/Component name
  • group: Which will be listed under the group.
  • contents: Every language content contains in this object.

Note : Content object generated as dynamic by plekan.

  • html: Dirty html of module/row (special of language)
  • fields: This object includes of attr in row such as img source,list,text e.g. This feature supported by plekan. But not generated as dynamic , you will have to generate this feature yourself. see example

We think feilds is for mobile device because any platform not support html tags. For example : <img /> (for Android). You want to display img on mobile application , you will need img source but you can replace html of img tag. In this case you help fields object. See more Example

  • index: This field will create as dynamic by plekan. Not change .
Clone this wiki locally