Blog view using ext:joomla.model.articles and links with the Joomla router
Note: I am just adding a few CSS lines in my PHP file in order to display the Articles as nice Cards. That CSS is put into the head of the page automatically by Pages.
-
Organization 1
Category: Organizations
This article was published on 20 Apr 2021 for the demo
Excerpt (ex-introtext):
Introtext 1
Text (ex-fulltext):
Fulltext 1
(ex-introtext + ex-fulltext):
Introtext 1
Fulltext 1
Custom Field Label and Value:
social.brussels ID: 13817Name from external json:
OCMW BRUSSEL - SOCIALE ACTIEAddress from external json:
296 Hoogstraat 1000 BRUSSEL -
Organization 2
Category: Organizations
This article was published on 21 Apr 2021 for the demo
Excerpt (ex-introtext):
Text (ex-fulltext):
Introtext 2
(ex-introtext + ex-fulltext):
Introtext 2
Custom Field Label and Value:
social.brussels ID: 3322Name from external json:
DE BRUSSELSE WONINGAddress from external json:
37 Kardinaal Mercierstraat 1000 BRUSSEL -
Organization 3
Category: Organizations
This article was published on 22 Apr 2021 for the demo
Excerpt (ex-introtext):
Text (ex-fulltext):
Introtext 3
(ex-introtext + ex-fulltext):
Introtext 3
Custom Field Label and Value:
social.brussels ID: 470Name from external json:
GGC - OBSERVATORIUM VOOR GEZONDHEID EN WELZIJN VAN BRUSSEL-HOOFDSTAD - VERENIGINGSTRAATAddress from external json:
15 Verenigingstraat 1000 BRUSSEL
And here is a little var_dump(collection())
so that you can see all what is immediately available in the array itself:
object(ComPagesModelEntityItems)#1845 (3) {
[2]=>
array(25) {
["id"]=>
string(1) "2"
["slug"]=>
string(14) "organization-1"
["title"]=>
string(14) "Organization 1"
["summary"]=>
string(0) ""
["category"]=>
string(753) "object(ExtJoomlaModelEntityCategory)#2099 (16) {
["id"]=>
string(1) "8"
["slug"]=>
string(13) "organizations"
["title"]=>
string(13) "Organizations"
["summary"]=>
string(0) ""
["date"]=>
string(25) "2021-04-22T08:35:56+00:00"
["edited_date"]=>
string(25) "2021-04-22T08:35:56+00:00"
["author"]=>
string(3) "844"
["editor"]=>
string(3) "844"
["impressions"]=>
int(0)
["direction"]=>
string(4) "auto"
["language"]=>
string(1) "*"
["parent"]=>
NULL
["published"]=>
string(1) "1"
["image"]=>
array(0) {
}
["name"]=>
string(13) "Organizations"
["metadata"]=>
array(4) {
["og:title"]=>
NULL
["og:url"]=>
NULL
["og:image"]=>
NULL
["og:description"]=>
NULL
}
}
"
["tags"]=>
array(2) {
[0]=>
string(4) "tag1"
[1]=>
string(4) "tag3"
}
["date"]=>
string(25) "2021-04-20T08:38:13+00:00"
["edited_date"]=>
string(25) "2021-07-05T15:53:31+00:00"
["published_date"]=>
string(25) "2021-04-20T08:38:13+00:00"
["archived_date"]=>
NULL
["author"]=>
string(3) "844"
["editor"]=>
string(3) "844"
["image"]=>
array(3) {
["url"]=>
string(25) "/images/headers/maple.jpg"
["alt"]=>
string(5) "maple"
["caption"]=>
string(5) "maple"
}
["impressions"]=>
int(0)
["direction"]=>
string(4) "auto"
["language"]=>
string(1) "*"
["published"]=>
string(1) "1"
["archived"]=>
string(1) "0"
["trashed"]=>
string(1) "0"
["featured"]=>
string(1) "0"
["links"]=>
array(0) {
}
["ordering"]=>
int(1)
["fields"]=>
string(4061) "object(ExtJoomlaModelEntityFields)#2386 (4) {
["socialbrusselsid"]=>
array(14) {
["id"]=>
string(1) "1"
["name"]=>
string(16) "socialbrusselsid"
["title"]=>
string(18) "social.brussels ID"
["type"]=>
string(4) "text"
["label"]=>
string(18) "social.brussels ID"
["default"]=>
string(0) ""
["published"]=>
string(1) "1"
["required"]=>
string(1) "0"
["params"]=>
array(2) {
["filter"]=>
string(0) ""
["maxlength"]=>
string(0) ""
}
["group"]=>
NULL
["language"]=>
string(1) "*"
["multi"]=>
string(1) "0"
["ordering"]=>
int(1)
["value"]=>
string(5) "13817"
}
["youtube"]=>
array(14) {
["id"]=>
string(1) "2"
["name"]=>
string(7) "youtube"
["title"]=>
string(11) "YouTube URL"
["type"]=>
string(3) "url"
["label"]=>
string(11) "YouTube URL"
["default"]=>
string(0) ""
["published"]=>
string(1) "1"
["required"]=>
string(1) "0"
["params"]=>
array(2) {
["schemes"]=>
array(1) {
[0]=>
string(5) "https"
}
["relative"]=>
string(0) ""
}
["group"]=>
NULL
["language"]=>
string(1) "*"
["multi"]=>
string(1) "0"
["ordering"]=>
int(2)
["value"]=>
string(43) "https://www.youtube.com/watch?v=LXeaDPmHP18"
}
["repeatable"]=>
array(14) {
["id"]=>
string(1) "4"
["name"]=>
string(10) "repeatable"
["title"]=>
string(10) "Repeatable"
["type"]=>
string(10) "repeatable"
["label"]=>
string(10) "Repeatable"
["default"]=>
string(0) ""
["published"]=>
string(1) "1"
["required"]=>
string(1) "0"
["params"]=>
array(1) {
["fields"]=>
array(1) {
["fields0"]=>
array(3) {
["fieldname"]=>
string(4) "DATE"
["fieldtype"]=>
string(8) "calendar"
["fieldfilter"]=>
string(1) "1"
}
}
}
["group"]=>
NULL
["language"]=>
string(1) "*"
["multi"]=>
string(1) "0"
["ordering"]=>
int(3)
["value"]=>
array(0) {
}
}
["internal-link-reverse"]=>
array(14) {
["id"]=>
string(1) "5"
["name"]=>
string(21) "internal-link-reverse"
["title"]=>
string(21) "Internal Link Reverse"
["type"]=>
string(14) "articleslinked"
["label"]=>
string(19) "internallinkreverse"
["default"]=>
string(0) ""
["published"]=>
string(1) "1"
["required"]=>
string(1) "0"
["params"]=>
array(24) {
["filter_categories"]=>
string(1) "0"
["categories_inc_children"]=>
string(1) "0"
["filter_tags"]=>
string(1) "0"
["tags_inc_children"]=>
string(1) "0"
["filter_language"]=>
string(1) "0"
["language"]=>
string(5) "nl-NL"
["filter_users"]=>
string(1) "0"
["filter_customfields"]=>
string(1) "0"
["customfield1_id"]=>
string(0) ""
["customfield1_value"]=>
string(0) ""
["customfield2_id"]=>
string(0) ""
["customfield2_value"]=>
string(0) ""
["customfield3_id"]=>
string(0) ""
["customfield3_value"]=>
string(0) ""
["linked_articles_ordering"]=>
string(5) "title"
["linked_articles_ordering_direction"]=>
string(3) "ASC"
["linked_articles_ordering_2"]=>
string(7) "created"
["linked_articles_ordering_direction_2"]=>
string(4) "DESC"
["layout"]=>
string(5) "title"
["custom_field"]=>
string(0) ""
["link_title"]=>
string(1) "1"
["custom_html"]=>
string(36) "[title] ([hits])"
["use_separator"]=>
string(1) "1"
["separator"]=>
string(2) ", "
}
["group"]=>
NULL
["language"]=>
string(1) "*"
["multi"]=>
string(1) "0"
["ordering"]=>
int(4)
["value"]=>
string(1) "0"
}
}
"
["metadata"]=>
array(10) {
["og:type"]=>
string(7) "article"
["og:title"]=>
string(14) "Organization 1"
["og:url"]=>
NULL
["og:image"]=>
string(25) "/images/headers/maple.jpg"
["og:description"]=>
NULL
["article:published_time"]=>
string(25) "2021-04-20T08:38:13+00:00"
["article:modified_time"]=>
string(25) "2021-07-05T15:53:31+00:00"
["article:expiration_time"]=>
NULL
["article:tag"]=>
string(9) "tag1,tag3"
["og:locale"]=>
string(1) "*"
}
["name"]=>
string(14) "Organization 1"
}
[3]=>
array(25) {
["id"]=>
string(1) "3"
["slug"]=>
string(14) "organization-2"
["title"]=>
string(14) "Organization 2"
["summary"]=>
string(0) ""
["category"]=>
string(753) "object(ExtJoomlaModelEntityCategory)#2206 (16) {
["id"]=>
string(1) "8"
["slug"]=>
string(13) "organizations"
["title"]=>
string(13) "Organizations"
["summary"]=>
string(0) ""
["date"]=>
string(25) "2021-04-22T08:35:56+00:00"
["edited_date"]=>
string(25) "2021-04-22T08:35:56+00:00"
["author"]=>
string(3) "844"
["editor"]=>
string(3) "844"
["impressions"]=>
int(0)
["direction"]=>
string(4) "auto"
["language"]=>
string(1) "*"
["parent"]=>
NULL
["published"]=>
string(1) "1"
["image"]=>
array(0) {
}
["name"]=>
string(13) "Organizations"
["metadata"]=>
array(4) {
["og:title"]=>
NULL
["og:url"]=>
NULL
["og:image"]=>
NULL
["og:description"]=>
NULL
}
}
"
["tags"]=>
array(2) {
[0]=>
string(4) "tag1"
[1]=>
string(4) "tag2"
}
["date"]=>
string(25) "2021-04-21T08:38:13+00:00"
["edited_date"]=>
string(25) "2021-07-05T15:18:10+00:00"
["published_date"]=>
string(25) "2021-04-21T08:38:13+00:00"
["archived_date"]=>
NULL
["author"]=>
string(3) "844"
["editor"]=>
string(3) "844"
["image"]=>
array(3) {
["url"]=>
string(29) "/images/headers/raindrops.jpg"
["alt"]=>
string(9) "raindrops"
["caption"]=>
string(9) "raindrops"
}
["impressions"]=>
int(0)
["direction"]=>
string(4) "auto"
["language"]=>
string(1) "*"
["published"]=>
string(1) "1"
["archived"]=>
string(1) "0"
["trashed"]=>
string(1) "0"
["featured"]=>
string(1) "0"
["links"]=>
array(0) {
}
["ordering"]=>
int(2)
["fields"]=>
string(4060) "object(ExtJoomlaModelEntityFields)#2656 (4) {
["socialbrusselsid"]=>
array(14) {
["id"]=>
string(1) "1"
["name"]=>
string(16) "socialbrusselsid"
["title"]=>
string(18) "social.brussels ID"
["type"]=>
string(4) "text"
["label"]=>
string(18) "social.brussels ID"
["default"]=>
string(0) ""
["published"]=>
string(1) "1"
["required"]=>
string(1) "0"
["params"]=>
array(2) {
["filter"]=>
string(0) ""
["maxlength"]=>
string(0) ""
}
["group"]=>
NULL
["language"]=>
string(1) "*"
["multi"]=>
string(1) "0"
["ordering"]=>
int(1)
["value"]=>
string(4) "3322"
}
["youtube"]=>
array(14) {
["id"]=>
string(1) "2"
["name"]=>
string(7) "youtube"
["title"]=>
string(11) "YouTube URL"
["type"]=>
string(3) "url"
["label"]=>
string(11) "YouTube URL"
["default"]=>
string(0) ""
["published"]=>
string(1) "1"
["required"]=>
string(1) "0"
["params"]=>
array(2) {
["schemes"]=>
array(1) {
[0]=>
string(5) "https"
}
["relative"]=>
string(0) ""
}
["group"]=>
NULL
["language"]=>
string(1) "*"
["multi"]=>
string(1) "0"
["ordering"]=>
int(2)
["value"]=>
string(43) "https://www.youtube.com/watch?v=Gooof6e6BvQ"
}
["repeatable"]=>
array(14) {
["id"]=>
string(1) "4"
["name"]=>
string(10) "repeatable"
["title"]=>
string(10) "Repeatable"
["type"]=>
string(10) "repeatable"
["label"]=>
string(10) "Repeatable"
["default"]=>
string(0) ""
["published"]=>
string(1) "1"
["required"]=>
string(1) "0"
["params"]=>
array(1) {
["fields"]=>
array(1) {
["fields0"]=>
array(3) {
["fieldname"]=>
string(4) "DATE"
["fieldtype"]=>
string(8) "calendar"
["fieldfilter"]=>
string(1) "1"
}
}
}
["group"]=>
NULL
["language"]=>
string(1) "*"
["multi"]=>
string(1) "0"
["ordering"]=>
int(3)
["value"]=>
array(0) {
}
}
["internal-link-reverse"]=>
array(14) {
["id"]=>
string(1) "5"
["name"]=>
string(21) "internal-link-reverse"
["title"]=>
string(21) "Internal Link Reverse"
["type"]=>
string(14) "articleslinked"
["label"]=>
string(19) "internallinkreverse"
["default"]=>
string(0) ""
["published"]=>
string(1) "1"
["required"]=>
string(1) "0"
["params"]=>
array(24) {
["filter_categories"]=>
string(1) "0"
["categories_inc_children"]=>
string(1) "0"
["filter_tags"]=>
string(1) "0"
["tags_inc_children"]=>
string(1) "0"
["filter_language"]=>
string(1) "0"
["language"]=>
string(5) "nl-NL"
["filter_users"]=>
string(1) "0"
["filter_customfields"]=>
string(1) "0"
["customfield1_id"]=>
string(0) ""
["customfield1_value"]=>
string(0) ""
["customfield2_id"]=>
string(0) ""
["customfield2_value"]=>
string(0) ""
["customfield3_id"]=>
string(0) ""
["customfield3_value"]=>
string(0) ""
["linked_articles_ordering"]=>
string(5) "title"
["linked_articles_ordering_direction"]=>
string(3) "ASC"
["linked_articles_ordering_2"]=>
string(7) "created"
["linked_articles_ordering_direction_2"]=>
string(4) "DESC"
["layout"]=>
string(5) "title"
["custom_field"]=>
string(0) ""
["link_title"]=>
string(1) "1"
["custom_html"]=>
string(36) "[title] ([hits])"
["use_separator"]=>
string(1) "1"
["separator"]=>
string(2) ", "
}
["group"]=>
NULL
["language"]=>
string(1) "*"
["multi"]=>
string(1) "0"
["ordering"]=>
int(4)
["value"]=>
string(1) "0"
}
}
"
["metadata"]=>
array(10) {
["og:type"]=>
string(7) "article"
["og:title"]=>
string(14) "Organization 2"
["og:url"]=>
NULL
["og:image"]=>
string(29) "/images/headers/raindrops.jpg"
["og:description"]=>
NULL
["article:published_time"]=>
string(25) "2021-04-21T08:38:13+00:00"
["article:modified_time"]=>
string(25) "2021-07-05T15:18:10+00:00"
["article:expiration_time"]=>
NULL
["article:tag"]=>
string(9) "tag1,tag2"
["og:locale"]=>
string(1) "*"
}
["name"]=>
string(14) "Organization 2"
}
[4]=>
array(25) {
["id"]=>
string(1) "4"
["slug"]=>
string(14) "organization-3"
["title"]=>
string(14) "Organization 3"
["summary"]=>
string(0) ""
["category"]=>
string(753) "object(ExtJoomlaModelEntityCategory)#2313 (16) {
["id"]=>
string(1) "8"
["slug"]=>
string(13) "organizations"
["title"]=>
string(13) "Organizations"
["summary"]=>
string(0) ""
["date"]=>
string(25) "2021-04-22T08:35:56+00:00"
["edited_date"]=>
string(25) "2021-04-22T08:35:56+00:00"
["author"]=>
string(3) "844"
["editor"]=>
string(3) "844"
["impressions"]=>
int(0)
["direction"]=>
string(4) "auto"
["language"]=>
string(1) "*"
["parent"]=>
NULL
["published"]=>
string(1) "1"
["image"]=>
array(0) {
}
["name"]=>
string(13) "Organizations"
["metadata"]=>
array(4) {
["og:title"]=>
NULL
["og:url"]=>
NULL
["og:image"]=>
NULL
["og:description"]=>
NULL
}
}
"
["tags"]=>
array(1) {
[0]=>
string(4) "tag2"
}
["date"]=>
string(25) "2021-04-22T08:38:13+00:00"
["edited_date"]=>
string(25) "2021-07-05T15:18:14+00:00"
["published_date"]=>
string(25) "2021-04-22T08:38:13+00:00"
["archived_date"]=>
NULL
["author"]=>
string(3) "844"
["editor"]=>
string(3) "844"
["image"]=>
array(3) {
["url"]=>
string(31) "/images/headers/walden-pond.jpg"
["alt"]=>
string(11) "walden pond"
["caption"]=>
string(11) "walden pond"
}
["impressions"]=>
int(0)
["direction"]=>
string(4) "auto"
["language"]=>
string(1) "*"
["published"]=>
string(1) "1"
["archived"]=>
string(1) "0"
["trashed"]=>
string(1) "0"
["featured"]=>
string(1) "0"
["links"]=>
array(0) {
}
["ordering"]=>
int(3)
["fields"]=>
string(5776) "object(ExtJoomlaModelEntityFields)#2770 (5) {
["socialbrusselsid"]=>
array(14) {
["id"]=>
string(1) "1"
["name"]=>
string(16) "socialbrusselsid"
["title"]=>
string(18) "social.brussels ID"
["type"]=>
string(4) "text"
["label"]=>
string(18) "social.brussels ID"
["default"]=>
string(0) ""
["published"]=>
string(1) "1"
["required"]=>
string(1) "0"
["params"]=>
array(2) {
["filter"]=>
string(0) ""
["maxlength"]=>
string(0) ""
}
["group"]=>
NULL
["language"]=>
string(1) "*"
["multi"]=>
string(1) "0"
["ordering"]=>
int(1)
["value"]=>
string(3) "470"
}
["youtube"]=>
array(14) {
["id"]=>
string(1) "2"
["name"]=>
string(7) "youtube"
["title"]=>
string(11) "YouTube URL"
["type"]=>
string(3) "url"
["label"]=>
string(11) "YouTube URL"
["default"]=>
string(0) ""
["published"]=>
string(1) "1"
["required"]=>
string(1) "0"
["params"]=>
array(2) {
["schemes"]=>
array(1) {
[0]=>
string(5) "https"
}
["relative"]=>
string(0) ""
}
["group"]=>
NULL
["language"]=>
string(1) "*"
["multi"]=>
string(1) "0"
["ordering"]=>
int(2)
["value"]=>
string(43) "https://www.youtube.com/watch?v=g21IiNrkhXA"
}
["internallink"]=>
array(14) {
["id"]=>
string(1) "3"
["name"]=>
string(12) "internallink"
["title"]=>
string(13) "Internal link"
["type"]=>
string(8) "articles"
["label"]=>
string(13) "Internal link"
["default"]=>
string(0) ""
["published"]=>
string(1) "1"
["required"]=>
string(1) "0"
["params"]=>
array(17) {
["field_type"]=>
string(8) "articles"
["multiple"]=>
string(1) "1"
["filter_categories"]=>
string(1) "0"
["categories_inc_children"]=>
string(1) "0"
["articles_ordering"]=>
string(5) "title"
["articles_ordering_direction"]=>
string(3) "ASC"
["articles_ordering_2"]=>
string(7) "created"
["articles_ordering_direction_2"]=>
string(4) "DESC"
["layout"]=>
string(5) "title"
["custom_field"]=>
string(0) ""
["link_title"]=>
string(1) "0"
["custom_html"]=>
string(36) "[title] ([hits])"
["use_separator"]=>
string(1) "1"
["separator"]=>
string(2) ", "
["show_unpublished"]=>
string(1) "0"
["show_category"]=>
string(1) "0"
["articles_grouping"]=>
string(5) "title"
}
["group"]=>
NULL
["language"]=>
string(1) "*"
["multi"]=>
string(1) "1"
["ordering"]=>
int(3)
["value"]=>
array(3) {
[0]=>
string(1) "6"
[1]=>
string(1) "2"
[2]=>
string(1) "1"
}
}
["repeatable"]=>
array(14) {
["id"]=>
string(1) "4"
["name"]=>
string(10) "repeatable"
["title"]=>
string(10) "Repeatable"
["type"]=>
string(10) "repeatable"
["label"]=>
string(10) "Repeatable"
["default"]=>
string(0) ""
["published"]=>
string(1) "1"
["required"]=>
string(1) "0"
["params"]=>
array(1) {
["fields"]=>
array(1) {
["fields0"]=>
array(3) {
["fieldname"]=>
string(4) "DATE"
["fieldtype"]=>
string(8) "calendar"
["fieldfilter"]=>
string(1) "1"
}
}
}
["group"]=>
NULL
["language"]=>
string(1) "*"
["multi"]=>
string(1) "0"
["ordering"]=>
int(4)
["value"]=>
array(2) {
[0]=>
array(1) {
["DATE"]=>
string(10) "2021-05-05"
}
[1]=>
array(1) {
["DATE"]=>
string(10) "2021-06-01"
}
}
}
["internal-link-reverse"]=>
array(14) {
["id"]=>
string(1) "5"
["name"]=>
string(21) "internal-link-reverse"
["title"]=>
string(21) "Internal Link Reverse"
["type"]=>
string(14) "articleslinked"
["label"]=>
string(19) "internallinkreverse"
["default"]=>
string(0) ""
["published"]=>
string(1) "1"
["required"]=>
string(1) "0"
["params"]=>
array(24) {
["filter_categories"]=>
string(1) "0"
["categories_inc_children"]=>
string(1) "0"
["filter_tags"]=>
string(1) "0"
["tags_inc_children"]=>
string(1) "0"
["filter_language"]=>
string(1) "0"
["language"]=>
string(5) "nl-NL"
["filter_users"]=>
string(1) "0"
["filter_customfields"]=>
string(1) "0"
["customfield1_id"]=>
string(0) ""
["customfield1_value"]=>
string(0) ""
["customfield2_id"]=>
string(0) ""
["customfield2_value"]=>
string(0) ""
["customfield3_id"]=>
string(0) ""
["customfield3_value"]=>
string(0) ""
["linked_articles_ordering"]=>
string(5) "title"
["linked_articles_ordering_direction"]=>
string(3) "ASC"
["linked_articles_ordering_2"]=>
string(7) "created"
["linked_articles_ordering_direction_2"]=>
string(4) "DESC"
["layout"]=>
string(5) "title"
["custom_field"]=>
string(0) ""
["link_title"]=>
string(1) "1"
["custom_html"]=>
string(36) "[title] ([hits])"
["use_separator"]=>
string(1) "1"
["separator"]=>
string(2) ", "
}
["group"]=>
NULL
["language"]=>
string(1) "*"
["multi"]=>
string(1) "0"
["ordering"]=>
int(5)
["value"]=>
string(1) "1"
}
}
"
["metadata"]=>
array(10) {
["og:type"]=>
string(7) "article"
["og:title"]=>
string(14) "Organization 3"
["og:url"]=>
NULL
["og:image"]=>
string(31) "/images/headers/walden-pond.jpg"
["og:description"]=>
NULL
["article:published_time"]=>
string(25) "2021-04-22T08:38:13+00:00"
["article:modified_time"]=>
string(25) "2021-07-05T15:18:14+00:00"
["article:expiration_time"]=>
NULL
["article:tag"]=>
string(4) "tag2"
["og:locale"]=>
string(1) "*"
}
["name"]=>
string(14) "Organization 3"
}
}