enonic / app-rss

Apache License 2.0
2 stars 6 forks source link

Implement Category tags in RSS feed #6

Closed Bellfalasch closed 7 years ago

Bellfalasch commented 7 years ago

Use the RSS feature of adding category data to each feed item.

pvmerlo commented 7 years ago

In the solution I'm working now, we use category as a relationship, but XP has a "Tag" input type that I think that's used in other sites as categories of each post too. We should handle these two type of categories, as objects and tag-like, right?

Bellfalasch commented 7 years ago

It's problematic since it can be implemented in any of these ways and that's why I haven't planned this feature for 1.0 release. But at least it is a bit more important than author, and hopefully simpler to add. Using the tags data type I already have code for, in the superhero theme. I just wonder how to best implement the field mapping for this ... might need some extra config.

pvmerlo commented 7 years ago

I think we don't need extra configs. We can just watch the field for categories if it matches to a list of ids (using the regex "\/\/\w{8}-\w{4}-\w{4}-\w{4}-\w{12}/g") or simple texts, in case of Tag input-type. What do you think about this approach?

Bellfalasch commented 7 years ago

That is true, with that being there (a id/key) we can "just" do a content.get() on it and display it's displayName. That's a good approach. If not a id/key the field can be used as is (as string).