Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download code not work #14

Open
saleemhaq opened this issue Sep 26, 2022 · 8 comments
Open

Download code not work #14

saleemhaq opened this issue Sep 26, 2022 · 8 comments

Comments

@saleemhaq
Copy link

I directly download the code and run the project when i add commentator part in blog post content type the application going to crashed:

see:

image

and i see the file exist in directory:

image

after several hours working i see its build action is :

image

when change to content it also not work getting differ error please advise and help how i used that in version: #13

@jsalgado10
Copy link
Owner

What version of OrchardCore are you using? Currently, the plugin is using Orchard Core 1.4 and your application will need to use the same version.

@saleemhaq
Copy link
Author

saleemhaq commented Sep 27, 2022

I successfully add that module in my project

image

On dashboard side:

image

just want to know how to used that in razor instead of liquid because we used razor see

got error please advise @jsalgado10 :

image

@jsalgado10
Copy link
Owner

Ok I see, you are a using decouple CMS instance. I have gotten a chance to test the plugin on a decoupled CMS application. Let me test this and will get back with you

@saleemhaq
Copy link
Author

Ok I see, you are a using decouple CMS instance. I have gotten a chance to test the plugin on a decoupled CMS application. Let me test this and will get back with you

Please help me I used the razor page and inject your module want to used that in my pages. @jsalgado10

@jsalgado10
Copy link
Owner

Ok I see, you are a using decouple CMS instance. I have gotten a chance to test the plugin on a decoupled CMS application. Let me test this and will get back with you

Please help me I used the razor page and inject your module want to used that in my pages. @jsalgado10

Unfortunately, the comments are not saved as part of the blog post but as separate content items that are just linked to it. Therefore, you cannot use the DispayAsync Razor helper on the CommentatorPart that is part of the Blog post on a decoupled CMS Application.

What I might be able to do is create a Razor helper that will return a list of all the comments linked to the ContentItem in question. I believe you should be able to use that list and call the DisplayAsync method on each of those records

@saleemhaq
Copy link
Author

saleemhaq commented Sep 27, 2022

Ok I see, you are a using decouple CMS instance. I have gotten a chance to test the plugin on a decoupled CMS application. Let me test this and will get back with you

Please help me I used the razor page and inject your module want to used that in my pages. @jsalgado10

Unfortunately, the comments are not saved as part of the blog post but as separate content items that are just linked to it. Therefore, you cannot use the DispayAsync Razor helper on the CommentatorPart that is part of the Blog post on a decoupled CMS Application.

What I might be able to do is create a Razor helper that will return a list of all the comments linked to the ContentItem in question. I believe you should be able to use that list and call the DisplayAsync method on each of those records

For this helper it returns the specific trail of each and individual posts, correct? If we have 10 blog post and every blog has 10 comments of individual person, so it returns the specifically comments for all, correct?

we have requirement like that :

image

How I save their email address as well?
Please let me know once it done
I need to use that @jsalgado10 thanks in advance.

@saleemhaq
Copy link
Author

Is the Razor helper being available and I might be used that? @jsalgado10

@jsalgado10
Copy link
Owner

@saleemhaq I have added a new Razor helper GetContentItemCommentsAsync that you can use to get all the comments for a content item. The method will return an IEnumerable

You should be able to do the following
var comments = await Orchard.GetContentItemCommentsAsync(Id);

and loop through the collection to call the DisplayAsync method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants