All of the logics below are implemented in app/Http/Livewire/Front/WidgetArticles.php
'categories' => [],
'last_x_days' => 365,
'backfill' => [
0 => 'None',
1 => 'Expand Categories',
2 => 'Expand Time frame',
3 => 'Specific Article IDs',
],
'sorting' => [
0 => 'Last articles',
1 => 'Rotation',
2 => 'Last articles, randomized'
],
'multiplier' => 0,
'rotations' => [
0 => "Prio by time frame",
// Articles from categories where factor field has greater value
1 => "Prio by category factor",
2 => "Prioritize by # ads",
3 => "Prioritize by # of ad mm",
4 => "Prioritize by page view"
],
'multi_page_advertorials' => [
// only magazines with hubpage images instead of direct articles
0 => 'Consolidated as one advertorial with cover image and flap',
// only articles with magazines but show articles directly
1 => 'Dont show multi page advertorials',
// all articles (dont matter with or without magazines)
2 => 'Simple articles',
// only articles without magazine
3 => 'Consolidated articles',
// Show both
4 => 'Magazine articles and single articles'
],
'limit' => 6,
'desc_limit' => 180,
'read_more' => false,
'read_more_text' => null,
'slides_desktop' => 0,
'slides_mobile' => 0,
'styles' => ''
When selected from the dropdown the articles fetched for that widget will be only for the selected categories.
If the requested widget has a category url as suffix (for example: https://trmwidget.eu/get/widget/sonderthemen.infranken.de/js/637c7d33e4460b487d5b03c6797ecd8d/category/bad_kissingen) then the widget will only search for articles from categories specificed in the url. In the above case, a category with alias: bad_kissingen. An exception to this rule are the backfill articles. If the backfill logic is specified as Expand Timeframe or Specific Article IDs then selected categories won’t have an affect unless the Backfill is set to Expand Categories.
Example: If widget https://trmwidget.eu/get/widget/sonderthemen.infranken.de/js/637c7d33e4460b487d5b03c6797ecd8d/category/bad_kissingen is set to fetch articles from the last 60 days and the backfill is set to Expand Timeframe with value of 30 days then the script will try to load articles from category bad_kissingen, but if no articles are found in that category for the last 60 days, then it will continue using the Backfill logic and will try find articles from the last 90 days from any category.
How much days behind the script will look for articles. If set to 30 days then the widget will search for articles published in the last 30 days.
Used to set extra logic to lookup for articles if the default logic returns 0 logic. Supports 3 options:
Expand Categories : Will look for backfill articles only in the provided categories listExpand Time frame : Will expand the initial Last_X_Days limit with the provided value. For example if last_x_days set to 30 days and Expand Time Frame set to 40 days. It will search for articles in the last 70 days.Specific Article IDs : Will get a specified list of article IDs. If list is longer then the limit option, then it will skipp the extra articles.Will sort the articles based on they publishing date (in a descending manner) and by article ID (in a descending manner). For example if we have 3 articles with the same publishing date, the one with biggest ID number will be at the top.
If this option is selected then a multiplier value should be provided. Option is similar to last articles (will take the latest published article), but it will take more articles then specified in the limit. For example if widget’s limit is set to articles 4 and Sorting is set to Last articles Randomized with Multiplier of 3 then the resulting articles limit will be 4x3=12(limitxmultiplier) Then those 12 articles will be reordered in a random way and the top 4 (initially specified limit) will be returned to the widget view.
The following rotations are supported:
Calculate the day difference between article’s start date and article’s end date. The articles with lowest difference will be at the top. For this to work articles must have set both start and end date.
Order by articles by category factory number. This option is executed after the articles are already fetched. For example if set the widget to take the last 3 articles for an integration by default they will be ordered by Publishing date and ID. But lets say the 2nd article has category factor set to 5, but the other two has category factor set to 1 then then 2nd article will be displayed first.
The articles will ordered by the number of ads they have. The articles with most ads will come first.
The articles will be ordered by the number of ads milimeters they have. Those with highest number of milimeters will come first.
The articles will be ordered by page views in a ascending manner. Those with lowest page vies will come first. The data for page views is stored in tracking table. So in order for this to work the data in tracking table should be properly updated all the time.
Those options are implemented on both backend and frontend. Sometimes they might not be implemented in the frontend even as they’re set in the backend. More information below.
This option will return only articles which are assigned to magazine and only artice’s whose magazines has more then 1 article assigned to them.
Same as the option above. It will only return articles which are assigned to magazine and only artice’s whose magazines has more then 1 article assigned to them, but the idea is that on the FrontEnd we will show the plain articles without magazines covers and flaps.
This is default behaviour. Will return any articles (does not matter if have magazines or not)
This option will return only articles which are assigned to magazine but the magazine can have only 1 article assigned to it. (No constraint on the number of the magazine’s articles)
Show both.
These options always have effect on the Backend, but not always on the FE. For example if Multi Page Advertorials is set to Consolidated as one advertorial with cover image and flap then only magazine articles will be returned. However if the developer did not implement the articles to be displayed with an magazine cover flap on the FE part of the widget then it will look as they’re regular simple articles although they’re not.
The limit of the articles to be displayed in the widget.
Length of the article’s description in the widget. On the backend this is just a number in the widget settings, in order to work on the FE it should be explicitly implemented by the developer.
Whether to show a read more button or not. On the backend this is just a boolean value in the widget settings, in order to work on the FE it should be explicitly implemented by the developer.
The label/text of the Read More button. On the backend this is just a string value in the widget settings, in order to work on the FE it should be explicitly implemented by the developer.
Used only in widgets with slider. Specifies how much slides should the slider displays on the desktop in a single roation. For example if the slider widget has a limit ot 6 articles and the slides on desktop option is set to 2, then you will be able to slide the slider 3 times and you will no more then 2 articles at a time.
Same as slides on desktop, but applied only in the mobile version of the slider widget.
CSS that will be applied only for this widget