Adding templates to Topics

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 năm cách đây
How can I add templates(for examples SimpleText or Dictionary) for Topics(Like we have in Products-Single Variant and in Grid)?
I use  Nop2.4
Maybe somebody knows?
Thanks a lot.

Maybe somebody from a team can advise me ?
12 năm cách đây
Friends,  as I mentioned before, I need to develop functionality for assigning different layout templates for topics.I need to have dropdown eith names of templates in the page for editing topic.

1.I added new table TopicTemplate with a properties like manufacturetemplate table has.
Added FK TopicTemplateID to topics table.

2.Added  to Topic.cs(Core/Domain/Topics) property TopicTemplateId.Created TopicTemplate.cs in Domain/Topics .
3.Added to Nop.Service ITopicTemplatesService and TopicTemplatesService classes.
4.Added TopicTemplate caching in WEb/Infrastructure/Cache/ModuleCacheEventConsume.cs
5.Added property
  [NopResourceDisplayName("Admin.ContentManagement.Topics.Fields.TopicTemplate")]
        [AllowHtml]
        public int TopicTemplateId { get; set; }
        public IList<SelectListItem> AvailableTopicTemplates { get; set; }
in TopicModel class in Admin/ Modules.

6.In TopicController(Admin) added:
private readonly ITopicTemplateService _topicTemplateService;
and initialized in constructor:
this._topicTemplateService = topicTemplateService;

It compiles good.
It runs, but when i try to click on menu Content Managment-> Topics it gives me an error:

No parameterless constructor defined for this object.

What do i do wrong????????????????????????????
Please, help!!!!!!!!!!!!!!!!!!!!!!
12 năm cách đây
What's the stack trace?  This looks like an MVC error in your controller.  You may be calling an action and not providing any route values.

See here.

-D
11 năm cách đây
were you able to solve this? as Id like to add this to my project too.
11 năm cách đây
ipodrocker wrote:
were you able to solve this? as Id like to add this to my project too.


Yes, I have  made it! You need a help?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.