Create Comment Portal in cms

#1

Hi All,
How to create a comment portal in cms that will display all the comments present in documents.

Thanks & Regards,
Madhur Singh

#2

So iiuc you want people to be able to leave comments on documents and you want to be able to access that from the cms? Using forms you can have people leave comments. In the java component you can save this to the cms. I would suggest creating a special document type that links to the original document.

That’s just a start, you can make this more complex if you need additional features.

Some useful documentation:



#3

You can perhaps create a Perspective for the “portal”.
It is a bit difficult to create a Perspective using Wicket, and maybe you can use IFramePerspective plugin [1] instead, using any other simpler technologies.

[1] https://bloomreach-forge.github.io/iframe-perspective/

#5

Hi All,
I have created a cms perspective, so how to render dynamic data on that perspective.
e.g. like in site module wrote a controller using that controller sending the request and getting response and using ftl rendering the response.
so is it possible to write controller for cms and using ftl render the response in perspective. or there is any other way to achieve this.

Thanks & Regards,
Madhur Singh

#6

Did you use the IFramePerspective plugin?
If so, the SRC of the IFrame could be a URL from your site application.

#7

Hi woonsanko,
Thanks for your reply it’s working i have provided the iframe SRC as a ftl file URL,
Now how i can make secure that url, as suggest in iframe perspective document i.e. https://bloomreach-forge.github.io/iframe-perspective/non-wicket-comp-pages.html,
in my use case i’m rendering a ftl file i.e. present inside “repository-data” i.e. (/repository-data/webfiles/src/main/resources/site/freemarker/my.ftl), so as document suggest the “WicketSession” and JcrSession will available in cms project, so how to access WicketSession and JcrSession in ftl file instead of jsp file to make ftl file secure so that only cms user will access that ftl file or url.

Thanks & Regards,
Madhur Singh

#8

Hi All,
i have created a perspective using iframe perspective plugin, i have provided the iframe SRC as a ftl file URL,
Now how i can make secure that url, as suggest in iframe perspective document i.e. https://bloomreach-forge.github.io/iframe-perspective/non-wicket-comp-pages.html,
in my use case i’m rendering a ftl file i.e. present inside “repository-data” i.e. (/repository-data/webfiles/src/main/resources/site/freemarker/my.ftl), so as document suggest the “WicketSession” and JcrSession will available in cms project, so how to access WicketSession and JcrSession in ftl file instead of jsp file to make ftl file secure so that only cms user will access that ftl file or url.

Thanks & Regards,
Madhur Singh

#9

Hi Madhur,

As the webfiles are templates for SITE delivery tier application, you cannot access WicketSession from there. WicketSession is available only in CMS authoring tier application.
Therefore, the example in the page cannot apply to your case. So, I think you have two options if you want to secure the access by checking CMS user’s authentication status:

A. Don’t use the webfiles. Use JSP or Java servlet or filter in cms web application like the example to get access to WicketSession. If you use servlet or filter, you configure a separate FreemarkerServlet configuration in cms web application [1], let your servlet or filter dispatch (include) the freemarker template in CMS web application, not in webfiles in SITE. Your servlet or filter may check the WicketSession in this approach.

B. Suppose you configured a sitemap item in SITE which renders a page including a component + webfile ft template and you configured the path as IFrame’s SRC in the IFramePerspective in CMS app. This is what I suggested originally because I felt like you really wanted to use ftl in webfiles (which is only available in SITE application).
In this case, try to change the URL by adding _cmsinternal. For example, if the URI is /site/mypage, then try with /site/_cmsinternal/mypage for the IFrame’s SRC. The URL pattern with /_cmsinternal is the default pattern to cms authenticated users only in Channel Manager actually.

Regards,

Woonsan

[1] https://freemarker.apache.org/docs/pgui_misc_servlet.html