1. Overview
  2. FAQs
  3. Adding the contents of a text file to my code

Adding the contents of a text file to my code

Question: I want to add a text file's contents to a specific spot in my code generation cycle. How do I do that?

Answer: To achieve this, you need to take the following steps:

  1. Create an expander -  The expander type should be FILE; check the "Is Imported File" property. We will call our expander MENU_ITEMS.
  2. Select the file:
  3. Add the expander to the position in your code tree or editor where you want the file pulled in.

The generated output shows that the contents of:

C:\Users\admin\OneDrive\Documents\CodeStencil\ImportFolder\RadzenBlazor-menu.txt  

has been inserted into the generated 

C:\temp\CodeStencil\BlazorCRUDThreeTiered9\re-radzen-blazor\BlazorCRUDThreeTiered.Client\Layout\NavMenu.razor


Was this article helpful?