- ABP Framework version: v8.3.3
- UI Type: Blazor Server
- Database System: EF Core
- Tiered (for MVC) or Auth Server Separated (for Angular): no
- Exception message and full stack trace:
- Steps to reproduce the issue: add 11th custom code placeholder, generate entity page.
according to the documentation, "From ABP v8.0, up to 20 placeholders are allowed." I am using 8.3.3, but I cannot use more than 10-- the documentation also states up to 11 are allowed "currently." How do I make more than 10 placeholders (for custom code) work, in the abp suite templates? https://abp.io/docs/latest/suite/customizing-the-generated-code
8 Answer(s)
-
0
Hi, to add more than 10 custom-code placeholders, you should edit templates and add the relevant placeholder for the related templates. Here are the documents that you can check to see how to do that:
- https://abp.io/docs/latest/suite/customizing-the-generated-code#adding-new-custom-hook-points-changing-their-places-1
- https://abp.io/docs/latest/suite/editing-templates
-
0
Hi, to add more than 10 custom-code placeholders, you should edit templates and add the relevant placeholder for the related templates. Here are the documents that you can check to see how to do that:
- https://abp.io/docs/latest/suite/customizing-the-generated-code#adding-new-custom-hook-points-changing-their-places-1
- https://abp.io/docs/latest/suite/editing-templates
I quoted the documentation you linked me.... adding more hook points does nothing. They are ignored.
-
0
Hi, to add more than 10 custom-code placeholders, you should edit templates and add the relevant placeholder for the related templates. Here are the documents that you can check to see how to do that:
- https://abp.io/docs/latest/suite/customizing-the-generated-code#adding-new-custom-hook-points-changing-their-places-1
- https://abp.io/docs/latest/suite/editing-templates
I quoted the documentation you linked me.... adding more hook points does nothing. They are ignored.
We will test this and write back to you as soon as possible.
-
0
-
0
I am editing the same template as you-- if I put hook point 11 and 12 before and after %%child-entities-create-edit-modals%% neither hook point will show up, I get blank lines instead. Same result if I put the custom-code-blocks in the <modal> or in the <ModalContent> section right above. I have tested with a few different positions. All that appears in the generated .razor files is whitespace.
^^ another trial that did not work
-
0
I am editing the same template as you-- if I put hook point 11 and 12 before and after %%child-entities-create-edit-modals%% neither hook point will show up, I get blank lines instead. Same result if I put the custom-code-blocks in the <modal> or in the <ModalContent> section right above. I have tested with a few different positions. All that appears in the generated .razor files is whitespace.
^^ another trial that did not work
Hi, I'm able to reproduce your problem and will create an issue for this problem (our qa team could not reproduce it at the first time, because they first customized the template and then generated the pages). In the meantime, you can customize the template, then delete the
*.razor
(your razor file) and regenerate again. This will add the other placeholders to your file and they will not be overridden. Alternatively, instead of deleting the file, you can manually add the placeholder to both templates in Suite UI and in your application.Btw, your ticket has been refunded. Thanks for reporting this problem. Regards.
-
0
appreciate the diligence and the ticket refund. Deleting the .razor file before generating solved the issue. One more thing to note, the .extended.razor.cs file for the entity I am generating is also getting wiped on generation (even with content). Can I prevent this somehow, is this a bug? thanks
-
0
appreciate the diligence and the ticket refund. Deleting the .razor file before generating solved the issue. One more thing to note, the .extended.razor.cs file for the entity I am generating is also getting wiped on generation (even with content). Can I prevent this somehow, is this a bug? thanks
If it overrides your changes and is re-generated each time, then yes this is a bug. I will test this as well and create an internal issue for that. Thanks for reporting this problem too.
Regards.