Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate multiple html from one razor #938

Open
biologist9675 opened this issue Dec 10, 2020 · 1 comment
Open

Generate multiple html from one razor #938

biologist9675 opened this issue Dec 10, 2020 · 1 comment
Labels
Discussion/Question Discussions or questions about the code Feedback Needed Further information is requested

Comments

@biologist9675
Copy link

Hi,

I am mostly familiar with MVC and Web Forms. Trying to understand this great framework better and how to compose custom pipelines. I have a giant list of data loaded from the database using ReadDataModule. I want to pass subsets/chunks of this data to the same razor .cshtml and generate multiple html pages. Each html output page will be dynamically named based on some of the input data. I am trying to write a custom pipeline below to pass the chunks to the razor template multiple times, but having trouble understanding how to do this. Any help is appreciated.

public class TestPipeline : Pipeline
{
    public TestPipeline()
    {
        InputModules = new ModuleList
        {
            new ReadFiles("TestTemplate.cshtml")
        };

        ProcessModules = new ModuleList
        {
            new RenderRazor()
        };

        OutputModules = new ModuleList
        {
            new WriteFiles()
        };
    }
}
@daveaglick
Copy link
Member

Hey there, sorry for the extremely late reply. I'm catching up on the issues I managed to miss over the last year.

Are you still working on this and need help on how to do it, or were you able to figure it out? Let me know and I'll work up an example if you still need one.

@daveaglick daveaglick added Feedback Needed Further information is requested Discussion/Question Discussions or questions about the code labels Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion/Question Discussions or questions about the code Feedback Needed Further information is requested
Development

No branches or pull requests

2 participants