CaaS and Contentprojection of Datasets - Link to Detailpage
Author: mfitt
Publication Date: 9/16/2023 0:37
Hello,
I have a question regarding CaaS and Contentprojection of Datasets.
We have a datasource "News". In this datasource are two categories "press" and "company news".
"press" and "company news" should have different detailpages, so I created two with the filter that they are only for one category.
this results in two routes in Caas:
"routes": [ { "pageRef": "d242783f-8723-4307-b58c-d2f884072eca", "route": "/Test-Dev/TEST-MFI/Pressemeldungen/Eröffnung-des-Logistikzentrums-in-Cloppenburg-Rundgang-durch-das-neue-Logistikzentrum.html" }, { "pageRef": "95d42922-cad4-4a5d-887e-bd543f993f4f", "route": "/Test-Dev/TEST-MFI/Konzernnachrichten/Eröffnung-des-Logistikzentrums-in-Cloppenburg-Rundgang-durch-das-neue-Logistikzentrum.html" } ],but now I have the problem that I don't automatically know which route I should use as link to detailpage on the news overview page.
on the detail pages I have the following
"fsType": "Content2Section", "schema": "internal", "entityType": "News", "name": "news", "displayName": "News", "template": { "fsType": "TableTemplate", "name": "News", "displayName": "News", "identifier": "6173eb31-a58c-4aaa-8c59-23ffa5a6eb30", "uid": "internal.news", "uidType": "TEMPLATESTORE_SCHEMA" }, "query": "internal.press", "recordCountPerPage": 1, "maxPageCount": 0, "filterParams": {}, "ordering": [ { "attribute": "fs_id", "ascending": false } ]maybe I have to do a request with the category from the dataset and search within the query of the detailpages?
category from dataset:
"tt_type": { "fsType": "CMS_INPUT_RADIOBUTTON", "name": "tt_type", "value": { "fsType": "Option", "label": "Pressemeldung", "identifier": "press" } },
I already saw the documentation but it doesnt help me with that. https://docs.e-spirit.com/module/caas-connect/CaaS_Connect_FSM_Documentation_EN.html#caas-json-format
thanks,
Marcel
-
Author: boersteken - 10/17/2023 12:06
Hi Marcel,
you are correct that in your case there is no way of knowing which route to pick without additional context information. A simple map (category => detailPageRefId) will probably suffice for deciding which route to render for a given dataset document. You might have to define this map statically in your application, in case there is not enough information available to build it dynamically.
Best regards
Philipp
0
Please sign in to leave a comment.
Comments
1 comment