User Interface Flags
The following are all the user interface flags that can be set and defined in the tenant's definition.json for their Marfeel version.
allowInlineStyles
Description: When set to true, will set any custom inline style within a data-style attribute so Marfeel can then implement custom CSS.
Location: Configuration
Values: True/False
Example:
allowInlineStyles: "true"
***in the article HTML***
<span data-style="background-color: #FFF00">Highlighted content</span>
***in the custom scss***
span[data-style*="background-color: #FFF00" {
background-color: #FFF00;
font-weight: 700;
}
boilerpipeCharset
Description: Fixes the wrong display of characters and replace with appropriate language.
Location: Configuration
Values: String
Example:
"boilerpipeCharset":"iso-8859-1"
collapseGalleries
Description: Prevents a tenant's images from being displayed as a gallery in their Marfeel version. Setting it to true would simply activate the default behavior.
Location: Configuration
Values: True/False
Example:
"collapseGalleries":"false"
collapsableGalleriesBlacklist
Description: This flag prevents images that contain specific ids, classes, or attributes from being displayed as a gallery. Number signs (#) must be included for ids and dots (.) for classes.
Location: Configuration
Values: String
Example:
"collapsableGalleriesBlacklist":"[data-src*=ext_resources/img/rally],[src*=ext_resources/img/rally]"
commentsBeforeNativeAds [Deprecated]
Description: When set to true, places the commenting system above the native ads. Only used in L.
Location: Features
Values: True/False
Example:
"commentsBeforeNativeAds": true
cookiesPolicy
Description: Defines the tenant's cookie policy.
Values: String
Example:
"cookiesPolicy":"http://www.tenant.com/cookiesPolicy"
customDetailsLayout
Description: Defines one of the custom Marfeel article detail layouts residing in the tenant's folder in themes/default/detailsLayouts. The layouts are .jsp files.
Location: Configuration
Values: String
Example:
"customDetailsLayout":"rankings/rankings,/deportes/ranking/"
customFooter
Description: Defines the elements to include in a tenant's custom footer such links, main logo, and copyright.
Location: Features
Values: String
Example:
"customFooter": {
"links":[
["Classifieds", ""https://classifieds.tenant.com/"],
["Workwithus", "http://workwithus.tenant.com/"],
],
"mainLogo":["example","https://avatars0.githubusercontent.com/u/20967825?s=460&v=4"],
"copy":"© 2018 tenant.com., ALL RIGHTS RESERVED, see our Privacy Policy and Terms of Use"
}
deeplinkingCloseBtn
Description: When enabled, displays the Marfeel close button (X) (mrf-articleLinkButton) in the mosaic header when accessed via a deeplink.
Location: Features
Values: True/False
Example:
"deeplinkingCloseBtn": true
detailsLinksTarget
Description: Defines the target of the links inside the article details. For example, _self (in the same frame), _blank (in a new window).
Location: Configuration
Values: String
Example:
"detailsLinksTarget":"_self"
disableImagesReverseProxy
Description: When enabled, images load from the tenant's servers instead of Marfeel's. By default this feature is set to false.
Location: Features
Values: True/False
Example:
"disableImagesReverseProxy":true
disableLazyLoadForMedia
Description: When enabled, the article is only displayed when all the media has loaded.
Location: Configuration
Values: True/False
Example:
"disableLazyLoadForMedia": true
disableSwipeOnZoomableImage
Description: Disables swiping when a user has zoomed in on an image.
Location: Features
Values: True/False
Example:
"disableSwipeOnZoomableImage": true
disableAppleMobileWebApp
Description: When set to true, disables iOS native functionality that hides the address bar if the website is saved as a shortcut.
Location: Features
Values: True/False
Example:
"disableAppleMobileWebApp": true
disableCaptionRemoval
Description: When set to true, maintains the caption when processing the document.
Location: Features
Values: True/False
Example:
"disableCaptionRemoval": true
disableClassicVersion
Description: Removes the classic version link the customer's Marfeel mobile site that directs a user to the publisher's desktop version.
Location: Features
Values: True/False
Example:
"disableClassicVersion": true
disabledEnvironments
Description: Disables a section (hides it completely from the menu) in a specific environment (1 - browser, 2 - native)
Location: sectionDefinitions
Values: Integer
Example:
"disabledEnvironments": 2
disableInlineRelatedArticles
Description: When activated, disables the inline related articles function.
Location: Features
Values: True/False
Example:
"disableInlineRelatedArticles": true
disableLazyDetails
Description: When set to true, lazy loading is disabled and the article details are loaded at once.
Location: Features
Values: True/False
Example:
"disableLazyDetails": true
disclaimer
Description: Defines the tenant's disclaimer policy.
Values: String
Example:
"disclaimer":"http://www.tenant.com/disclaimer"
expirationPopUp
Description: Defines the expiration time for the newsletter popup (that is, the user won't be prompted to opt in to the newsletter until the number of days passes).
Location: Features
Values: Numerical
Example:
"expirationPopUp": 7
fbInstantConfiguration
Description: Defines objects such as disclaimers and the order of header items for a tenant's Facebook Instant Articles.
Location: Configuration
Values: Other
Example:
{
"disclaimer": "Copyright, 2001-2017.",
"headerItemsOrder": ["subtitle", "title", "kicker"]
}
forcePhotoArticles
Description: When set to true, enables the article to be opened directly in an image gallery without the text content.
Location: Configuration
Values: True/False
Example:
"forcePhotoArticles": "true"
forcePhotoArticlesByUrlPattern
Description: This flag is added in the configuration of the definition.json and it changes the behavior of the section mosaic link, forcing an article that is predominantly images to open in the image gallery view instead of the article details. It is followed by a pattern that will detect which URLs behave this way. For example
Location: Configuration
Values: String
Example:
"forcePhotoArticlesByUrlPattern": "/galerias/"
In this case, all the articles in the section mosaic where the URL contains "/galerias/" will redirect straight to the image gallery version.
forcePhotoArticleTablet
Description: Forces articles that are primarily images to be shown as photo articles.
Location: Features
Values: True/False
Example:
"forcePhotoArticleTablet": true
forceTopMediaGallery
Description: When enabled, displays top media as a gallery of all the images in an article.
Location: Features
Values: True/False
Example:
"forceTopMediaGallery": true
forceXL
Description: When set to true
, enables the XL tablet version. When set to native
or browser
, this flag activates XL in the native app or only in the browser.
Location: Features
Values: True/False or native/browser
Example:
"forceXL": true
headerLogoUrl
Description: Specifies a custom external URL that Marfeel redirects to when the header logo is tapped.
Location: Features
Values: String
Example:
"headerLogoUrl":"http://www.linkurl.com"
galleryTopMediaCaptionFromAlt
Description: When enabled, this flag activates captions for top media images in the image gallery. The caption text is picked from the alt attribute of the image.
Location: Features
Value: True/False
Example:
"galleryTopMediaCaptionFromAlt": true
headerLinks
Description: Specifies a custom external URL that Marfeel redirects to when the header logo is tapped.
Location: Features
Value: String
Example:
"headerLinks":[{
"id":"empleos",
"href":"http://empleos.laprensa.com.ni/",
"label":"Empleos"
},{
"id":"multimedia",
"href":"http://multimedia.laprensa.com.ni/",
"label":"multimedia"
}]
inlinePositionsProviders
Description: To support custom icons in sectionDefinition and headerLinks, add iconName as a new property of the object and the name of the icon to be applied as the value.
Location: headerLinks
Values: String
Example:
"headerLinks":[{
"id":"login",
"href":"http://www.marfeel.com/login",
"label":"Login",
"iconName": "user"
}]
If you don't specify the iconName for headerLinks, "external" will be the default value.
"sectionDefinitions":[{
"name":"section_test",
"title":"Test Section",
"type" : "EXTERNAL",
"iconName": "external",
"feedDefinitions":[{
...
}
}]
Icons are currently only applicable to external sections.
A list of all the available sets of icons can be found in MarfeelXP-master/Tenants/vhosts/marfeel/resources/icons.
infiniteScrollDetails
Description: Add infinite scroll to the article details of the tenant's XL version.
Location: Features
Value: True/False
Example:
"infiniteScrollDetails": true
img
Description: Defines an image or logo for a section in a menu.
Values: String
Example:
"img":"/statics/tenant/index/resources/img.png"
inlineNextArticleTitle
Description: Allows you to modify the text of the inline Next Articles according to any custom partner request with a value or no title.
Location: Features
Value: String
Example:
"inlineNextArticleTitle": "" /////for no title
"inlineNextArticleTitle": "More in Home"
inlinePositionsProviders
Description: Defines inline position providers such as Facebook.
Location: Features
Values: String
Example:
"inlinePositionsProviders": ["FACEBOOK"]
lang
Description: Defines the language for the user interface. Supported languages in Marfeel are listed in MarfeelXP/Tenants/vhosts/marfeel/resources/i18n/. There is one message file per locale, with a naming convention resembling the following: messages_<supported locale>.properties.
Location: userInterface
Values: String
Example:
"lang":"en"
lateralMenuCollapse
Description: If set to true, the lateral menu is collapsable.
Location: Features
Values: True/False
Example:
"lateralMenuCollapse": true
lateralMenuPlaceholder
Description: Defines a placeholder in the search bar on top of the lateral menu. For example, a cooking blog might might contain a "Search for Recipes" field.
Location: Features
Values: String
Example:
"lateralMenuPlaceholder":"Busca recetas"
lateralMenuSearch
Description: Adds a search bar for Wordpress-based sites and/or uses a "/?" search query param.
Location: Features
Values: True/False
Example:
"lateralMenuSearch":true
marfeelGardaMaxKrks
Description: Defines the number of times the Classic Version button needs to be clicked to persist the classic version.
Location: Features
Values: Integer
Example:
"marfeelGardaMaxKrks": 1
marfeelGardaDaysSpan
Description: Defines the number of days the classic version will be displayed before showing the Marfeel version again.
Location: Features
Values: Integer
Example:
"marfeelGardaDaysSpan": 31
mediaCaptionClass
Description: Defines a class to find an image caption. It can also be set to alt to get the alt attribute from an image. This flag must be inserted along with the "topMediaCaptionEnabled":"true"
flag to enable this function for Top Media.
Location: Features
Values: String
Example:
"mediaCaptionClass":"box-content-text"
"topMediaCaptionEnabled":"true"
militaryTimeFormat
Description: Sets the Marfeel clock time format to 24h in the header.
Location: Features
Values: True/False
Example:
"militaryTimeFormat": true
noPhotoArticles
Description: When set to true, prevents the article from being opened directly in the image gallery without any text.
Location: Configuration
Values: True/False
Example:
"noPhotoArticles":"true"
numberNextArticles
Description: Defines the number of next articles displayed in the article details. Usually, two next articles are displayed by default.
Location: Features
Values: Numerical
Example:
"numberNextArticles":"4"
numMosaicSquaresOnScreen
Description: Defines the number of section mosaic squares to be loaded for each screen. Meaning when Marfeel fetches new mosaic squares, the number defined will be fetched.
Location: Features
Values: Numerical
Example:
"numMosaicSquaresOnScreen": 8
pageViewTrackerUseDefaultNextArticleSelector
Description: When set to true, uses the default next article.
Location: Features
Values: True/False
Example:
"pageViewTrackerUseDefaultNextArticleSelector": false
photoGalleriesSlider
Description: Defines the tenant class that identifies the container for the photo slider and will detect the children images.
Location: Configuration
Values: String (Class)
Example:
"photoGalleriesSlider":".rslides"
pushNotificationsChrome
Description: When set to true, creates a new push notifications controller in Chrome.
Location: Features
Values: True/False
Example:
"pushNotificationsChrome": false
readingTime
Description: When set to false, hides both the icon and the time reading estimation.
Location: Features
Values: True/False
Example:
"readingTime": true
removeGalleriesRelatedImages
Description: When set to true, removes collapsed galleries from the article details.
Location: Features
Values: True/False
Example:
"removeGalleriesRelatedImages": true
removeMultipageRelatedImages
Description: Disables the related images that are shown at the end of a multi-page article if activated.
Location: Features
Values: True/False
Example:
"removeMultipageRelatedImages": "true"
removeNextPagesRelatedImages
Description: When set to true, removes collapsed galleries from nextPages.
Location: Features
Values: True/False
Example:
"removeNextPagesRelatedImages": true
removeTopMedia
Description: When enabled, removes top media from the article details.
Location: Features
Values: True/False
Example:
"removeTopMedia": true
sectionDefinitions
Description: Defines the type of sections to be rendered, ignored in the scrollable sections indicator (top menu), or external when swiping in the sections mosaic to another section.
Values: String
Example:
"sectionDefinitions":[{
"name": "tenant"
"type":"DEFAULT" / "SUBSECTION" / "EXTERNAL",
"title": "tenantTitle"
}]
showClassicVersionInHeader
Description: Show classic version icon into header.
Values: Boolean
Example:
"showClassicVersionInHeader": true
showTimestamp
Description: Show timestamp.
Values: boolean
Example:
"showTimestamp": true
styles
Description: Defines the style for sections within the menu.
Location: sectionDefinitions
Values: String
Example:
"styles":"subsection", // "main"
suggestionsEmailAddress
Description: Defines an email address to send suggestions and substitute the default contribute@marfeel.com.
Location: Features
Values: String
Example:
"suggestionsEmailAddress":"apps@tenant.com"
swipeUpHint
Description: When set to true, a hint for galleries is displayed when the user swipes up.
Location: Features
Values: True/False
Example:
"swipeUpHint":false
themeNameByGeo
Description: Defines different themes to be displayed depending on the geolocation of the reader.
Location: Features
Values: Node
Example:
"themeNameByGeo": {
"BR": {
"themeName": "k",
"scope": [
"s"
]
},
"PT": {
"themeName": "k",
"scope": [
"s"
]
},
"MZ": {
"themeName": "k",
"scope": [
"s"
]
},
"US": {
"themeName": "k",
"scope": [
"s"
]
},
"ES": {
"themeName": "k",
"scope": [
"s"
]
}
timeFormat
Description: Defines the time or date format displayed.
Location: Features
Values: String
Example:
"timeFormat": "d/M/yyyy"
topMediaAllowedRatio
Description: Defines a custom ration for the top media selector.
Location: Features
Values: Numerical
Example:
"topMediaAllowedRatio": 1000
topMediaCaptionEnabled
Description
Adds a caption to the Top Media. The value of this property effects what source is used for the caption.
- true: Use the Ad Dealer to insert the caption
- alt: The alt attribute of the image tag as the caption
- caption: Use the caption extracted by Boilerpipe.
- data-anything: Uses the value in the data-anything attribute of the image.
Location
Features
Values
- true
- alt
- caption
- data-xxx
Example
"topMediaCaptionEnabled": "true",
"topMediaCaptionEnabled": "alt",
"topMediaCaptionEnabled": "caption",
"topMediaCaptionEnabled": "data-caption"
topMediaSwipeHint
Description: When enabled, instead of displaying the top media caption in multiple lines, the caption is displayed in one and the reader swipes left to read it via a hint.
Location: Features
Values: True/False
Example:
"topMediaSwipeHint": true
"readingTime": true