Açık Kapalı

Text Templating: Render the updated template content #2990


User avatar
0
isaac.yip@cpy.com.hk oluşturuldu
  • ABP Framework version: v5.2.1
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

How to render the latest Text templating content?

After editing the TextTemplate content, we use the _templateRenderer.RenderAsync method which return the default content.

Which method should we use to get the updated content?


11 Cevap
  • User Avatar
    0
    maliming oluşturuldu
    Destek Takımı Fullstack Developer

    hi

    How to reproduce your problem?

    Please share the full steps. Thanks

  • User Avatar
    0
    isaac.yip@cpy.com.hk oluşturuldu
    1. Update the content in Text Templates Section

    2. Call the render function

    text = await TemplateRenderer.RenderAsync("Abp.Account.EmailSecurityCode",
                    new
                    {
                        code = 1234
                    });
    
  • User Avatar
    0
    maliming oluşturuldu
    Destek Takımı Fullstack Developer

    ok, I will check this.

  • User Avatar
    0
    maliming oluşturuldu
    Destek Takımı Fullstack Developer

    I tested, no problem.

    Can you create a new project by CLI and reproduce the problem?

    liming.ma@volosoft.com

  • User Avatar
    0
    isaac.yip@cpy.com.hk oluşturuldu

    I create a new project with microservice template, blazor ui and the problem still here.

    Are you using microservice template and blazor ui?

  • User Avatar
    0
    maliming oluşturuldu
    Destek Takımı Fullstack Developer

    ok

    I will test this in MS project.

  • User Avatar
    0
    maliming oluşturuldu
    Destek Takımı Fullstack Developer

    hi

    I tried, It works as expected.

    Maybe this is related to the Redis.

    Can you check?

  • User Avatar
    0
    isaac.yip@cpy.com.hk oluşturuldu

    Checked. No record in the Redis.

  • User Avatar
    0
    maliming oluşturuldu
    Destek Takımı Fullstack Developer

    hi

    Please reproduce in a new template project and share it with me. Thanks liming.ma@volosoft.com

  • User Avatar
    0
    maliming oluşturuldu
    Destek Takımı Fullstack Developer

    hi

    You should not use TemplateRenderer in Blazor projects, It's just a UI project, and the data comes from the API. The correct template info can be get from the API. You can only use various app services in Blazor, app services render templates and return content.

  • User Avatar
    0
    isaac.yip@cpy.com.hk oluşturuldu

    Thanks. It works now.

Made with ❤️ on ABP v8.2.0-preview Updated on Mart 25, 2024, 15:11