Activities of "enisn"

You have to create into your project Pages/Public/CmsKit/Pages/Index.cshtml.cs and Pages/Public/CmsKit/Pages/Index.cshtml with content which I presented

If I do have the cmsKit module source code, can I do it? If yes, I have created the class and page but the model is missing, MyIndexModel. What's Next?

I've just write it as MyIndexModel as a sample. You can name it whatever you want. And don't miss to add 'using' namespace of that model.

For the second question, yes you can directly make changes in source code of cmskit.

You have to create into your project Pages/Public/CmsKit/Pages/Index.cshtml.cs and Pages/Public/CmsKit/Pages/Index.cshtml with content which I presented

Hello @LawrenceKwan

You can learn more about customizing pages with following documentation: https://docs.abp.io/en/abp/latest/UI/AspNetCore/Customization-User-Interface


You can place following page into your project to replacement

Create following class into exact path under your Web project:

  • Pages/Public/CmsKit/Pages/Index.cshtml.cs
 public class MyIndexModel : CommonPageModel
{
    [BindProperty(SupportsGet = true)] 
    public string Slug { get; set; }

    protected IPagePublicAppService PagePublicAppService { get; }

    public PageDto Page { get; set; }

    public string YourParameter { get; set; }

    public IndexModel(IPagePublicAppService pagePublicAppService)
    {
        PagePublicAppService = pagePublicAppService;
    }

    public async Task<IActionResult> OnGetAsync()
    {
        Page = await PagePublicAppService.FindBySlugAsync(Slug);

        YourParameter = "Some result from request";
        
        if (Page == null)
        {
            return NotFound();
        }

        return Page();
    }
}

Then add following page into exact path under your Web project:

  • Pages/Public/CmsKit/Pages/Index.cshtml
@page
@using Microsoft.AspNetCore.Mvc.Localization
@using Volo.CmsKit.Localization
@using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Pages

@* ** Don't forget to Update Model from here: ** *@
@model MyIndexModel

@inject IHtmlLocalizer<CmsKitResource> L

@section styles{
    
    <abp-style src="/Pages/Public/CmsKit/Pages/index.css" />

    <style>
        @Html.Raw(Model.Page.Style)
    </style>
}

@section scripts{
    <script>
        @Html.Raw(Model.Page.Script)
    </script>
}

@* ** You can render anything before or after page content ** *@
<h1>@Model.YourParameter</h1>

@await Component.InvokeAsync(typeof(DefaultPageViewComponent),
    new
    {
        pageId = Model.Page.Id,
        title = Model.Page.Title,
        content = Model.Page.Content
    })

Are you sure Lepton Theme is built after your changes. Can you check last change dates of lepton dll's?

Hi maristides

You can replace Lepton theme package with source code via using ABP Suite:

https://support.abp.io/QA/Questions/462/How-can-I-download-Lepton-Theme-source-code#answer-443079cf-43ba-d676-cd46-39f7f66bc2fd

Then you can customize any part of the theme.

You can't call a service out of a Configure method, because DI Container hasn't be built yet.

In the .AddTransient method, I'm sure it works. When you inject a HttpClient, that method will be executed and create a HttpClient to inject to your required class. If you want to debug, put a breakpoint inside .AddTransient() method, and create a request to an method of appservice which injects HttpClient

Documentation of Background Jobs says:

"Background jobs are persistent that means they will be re-tried and executed later even if your application crashes."

...

  • Retries job execution until the job successfully runs or timeouts. Default timeout is 2 days for a job. Logs all exceptions.
  • Increasingly waits between retries for a job. It waits 1 minute for the first retry, 2 minutes for the second retry, 4 minutes for the third retry and so on.

Background Jobs are designed to execute that job if whatever happens.

Short answer is No. You can't set different retry count for each job with DefaultBackgroundJobManager. If you want a custom implementation, you can replace DefaultBackgroundJobManager with your CustomBackgroundJobManager. So it's open-source: https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/DefaultBackgroundJobManager.cs


You can create your own background service like that:

[Dependency(ReplaceServices = true)]
public class CustomBackgroundJobManager : DefaultBackgroundJobManager
{
    public CustomBackgroundJobManager(IClock clock, IBackgroundJobSerializer serializer, IBackgroundJobStore store, IGuidGenerator guidGenerator) : base(clock, serializer, store, guidGenerator)
    {
    }

    protected override Task<Guid> EnqueueAsync(string jobName, object args, BackgroundJobPriority priority = BackgroundJobPriority.Normal, TimeSpan? delay = null)
    {
        // Custom implementation
        throw new NotImplementedException();
    }
}

Will abp suite support file uploads fields in generated field (blob fields) ?

No. ABP Suite won't have that feature in v5.0

I can't recommend an exact bundler. You have to chosse one according to your project requirements.

Again, I can not recommend one of them directly but you may want to browse https://dev.to/underscorecode/javascript-bundlers-an-in-depth-comparative-is-webpack-still-the-best-bundler-in-2021-59jk

Hi Enisn, Thanks for the feedback on this. I will try this, but I thought it was bad practice to spool up new httpclients everytime it was needed and instead we should use httpclientfactory? Can I share what I have done so far for this point and get your feedback?

P.S before opening the question I tried for some hours and couldnt get any service back in configure service, always receive the exception

System.ArgumentNullException: 'Value cannot be null. (Parameter 'provider')'

Can you share more code? I can't understand from this line why your ServiceProvider is null

Showing 431 to 440 of 496 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35