FLEXIcontent / flexicontent-cck

Advanced content management for Joomla
http://www.flexicontent.org
82 stars 53 forks source link

Feed view modification #1049

Open micker opened 2 years ago

micker commented 2 years ago

We can update feed view to be more porwerfull and usuable 1 remove image on desciption and add ... arround https://github.com/FLEXIcontent/flexicontent-cck/blob/f21a7f22abc8be27075ee6b61976861ddeeb372f/site/views/category/view.feed.php#L185 2 remove extra field on description too to add xml enclosure, maybe we can add an option in field config to type enclosure like prefix and suffix what do think ?

micker commented 2 years ago

Flexicontent can add a rss feed for example for categories. For this, the file located in components/com_flexicontent/views/category/view.feed.php is used to parse all the fields. The user can add some fields in configuration (custom fields added for a type, or image to use in the feed). This file extend the calss JViewLegacy with the class FlexicontentViewCategory and fill $document to return to the Joomla renderer.

The renderer then generate the final rss file with the Joomla core file : /libraries/src/Document/Renderer/Feed/RssRenderer.php

The feed generated is always generated for each item with a unique rendered enclosure :

Then, in this enclosure, you will find all the informations for each article : if you have added image or extra fields, these informations will be added inside .

The goal is to be able to add the extra informations outside of . Then, if you add an image, the renderer should give you the choice to include as normally the image in the description OR if needed ask you the enclosure name to allow you to list the information outside of . For example, an image should be listed with :

xxxxxxxxxxxxxx

Same thing for any other extra field.

To achieve this on my side, check the whole thread here and dont forget to add an extra image field to use for the image in the type. This is then not a real issue but an very important new feature : this feature already exists in some components like JEvents RSS (the feed generated separarate all the information correctly). Why this is important ? Some people use for they needs an android apps (or Apple apps) and to populate their tools, they need the feed formatted with the value corresponding to their needs : for example, if the app have a "news" category, people need to retrieve the date, the description, the url to check the news online directly, and obviously an image. If now the image is in and not in his own enclosure, the android app does not show correctly the informations.

For the record, you can find this for example for City Hall apps : the city give to people an app and this is always asked.

Tell me if this is enought for you Yannick (if you need this explanation in french, I can explain this in french too ;) Xavier