🌞
.
पुराना
⁨Hindi⁩ दस्तावेज़ को अंतिम बार ⁨2022-03-07T12:29:40.633482+00:00⁩ को संशोधित किया गया था। तब से, ⁨English⁩ संस्करण में निम्नलिखित परिवर्तन हुए हैं।
यह दस्तावेज़ पुराना है
नवीनतम संस्करण दिखाएं
View changes
fpm वैरिऐबल्स
fpm.mobile
Type
boolean
Tip
This variable is dynamic, it can change after page load.
Tip
This variable is readonly, do not try to modify it.

This variable is set to true when the browser is mobile like. We detect mobile or desktop based on browser width. fpm.mobile-breakpoint can be used to customize when we switch from mobile to desktop.

fpm.mobile automatically changes when browser resizes.

fpm.mobile-breakpoint
Type
integer
Default Value
768
This is the width below which we consider show the mobile view.
fpm.language
Type
optional string
Tip
This variable is readonly, do not try to modify it.
This variable tells you the language of current package if provided in FPM.ftd file. This is generally the case when translation is enabled.
fpm.home-url
Type
string
Tip
This variable is readonly, do not try to modify it.
It gives the home url of the package which basically is //<package.name>.
Tip
fpm.home-url
fpm.translation-status-url
Type
string
Tip
This variable is readonly, do not try to modify it.
In case of translation package, the value is //<package.name>/FPM/translation-status/. Do not use this variable if translation is not enabled for this project.
fpm.language-toc
Type
fpm.language-toc-item list
Tip
This variable is readonly, do not try to modify it.
It is a list of record language-toc-item. This record has following structure
language-toc-item
-- record language-toc-item:
caption title:
string url:
It contains the list of all the available languages.
fpm.current-document-last-modified-on
Type
optional string
Tip
This variable is readonly, do not try to modify it.
This gives the last modified on in datetime format for the current document. It fetches it from the .history snapshots (which is available only after running fpm sync)
fpm.last-modified-on
Type
optional string
Tip
This variable is readonly, do not try to modify it.
This gives the last modified on in datetime format for the current package. It fetches it from the .history snapshots (which is available only after running fpm sync)
fpm.package-name
Type
string
Tip
This variable is readonly, do not try to modify it.
This gives the current package name. Eg fpm.dev.
fpm.number-of-documents
Type
optional string
Tip
This variable is readonly, do not try to modify it.

This gives the total number of documents available in current package. In case of translation package, it gives <total number of documents available in current package> / <total number of documents available in original package>

Note: It fetches it from .history snapshot latest record. So if the package is never synced it gives incorrect value.

fpm.diff
Type
optional string
Tip
This variable is readonly, do not try to modify it.
This show the difference in document on out of date translation state. Only to be used with fpm.translation-status is Outdated.
fpm.translation-status
Type
optional string
Tip
This variable is readonly, do not try to modify it.

When package is the translation package, it has following value for different states:

  • Missing
  • NeverMarked
  • UptoDate
  • Outdated

fpm.is-translation-package
Type
boolean
Tip
This variable is readonly, do not try to modify it.
This gives true if the package is the translation package, false otherwise
fpm.has-translations
Type
boolean
Tip
This variable is readonly, do not try to modify it.
This gives true if the package has translations available, false otherwise