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

Question: Passive Mode #2100

Open
pagner opened this issue Oct 17, 2024 · 2 comments
Open

Question: Passive Mode #2100

pagner opened this issue Oct 17, 2024 · 2 comments

Comments

@pagner
Copy link

pagner commented Oct 17, 2024

First of all, I'd like to say what a nice job you've done! I installed the default demo and I am inpressed with the quality of work. Good stuff.

I read some posts on Stack Overflow that you replied to about passive mode.

I want to add Piranha to an existing site and only use it for content management. I do not want it handling the routing at all. I already have my routing set up for localization using a sub-directory structure, i.e. mysite.com, mysite.com/es-es/, mysite.com/es-es/mypage.

Does passive mode still exist? Will I be able to accomplish the aforementioned?

Thanks

@pagner
Copy link
Author

pagner commented Oct 17, 2024

Had to do a search for headless.

From what I have read, I can use IApi to fetch data from the repository, but it appears I will be responsible for deseralizing on the front end? Are there any packages for the front end that will do that for me, so I can just loop through the blocks like in your demo example? Thanks.

@tidyui
Copy link
Member

tidyui commented Oct 20, 2024

Hi there! In startup you can simply disable all routing features to get it to run in "passive mode".

services.AddPiranha(options =>
{
    options.UseCms(o =>
    {
        o.UseAliasRouting = false;
        o.UseArchiveRouting = false;
        o.UsePageRouting = false;
        o.UsePostRouting = false;
        o.UseSitemapRouting = false;
        o.UseSiteRouting = false;
        o.UseStartpageRouting = false;
    });
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants