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

How to create links to different html files? #103

Open
ajbuchholz opened this issue Oct 8, 2019 · 2 comments
Open

How to create links to different html files? #103

ajbuchholz opened this issue Oct 8, 2019 · 2 comments

Comments

@ajbuchholz
Copy link

ajbuchholz commented Oct 8, 2019

I am relatively new to perl6 and I am working on a project and using Cro. I want to have a home page in which I can click different links that open other HTML files. I followed the documentation to make a static page, but I need to create a dynamic one. How do I go about doing that?

Still Learning Perl6 | Thanks

@Altai-man
Copy link
Member

Hi. By "dynamic page" you mean a single page application or you just want to present different server-side HTML to the user depending on some conditions of a request?

If the second one, Cro handles delivery for you, but does not restrict you to its own tool set when it comes to building sites, as it is not a web framework.
For templating you can use any engine you want, see https://modules.perl6.org/search/?q=template for available options.
There is one written by Cro author, https://github.com/croservices/cro-webapp, which has Cro::HTTP::Router related examples.

If you want a single page application, you'd need to inevitably work with javascript/node side of things, which are changing rapidly, but a tutorial of how Cro backend can look like is at https://cro.services/docs/intro/spa-with-cro

@ajbuchholz
Copy link
Author

Thank you. Sorry if that was confusing. I just wanted a home page with buttons that linked to other various HTML pages. I will take a look at the Cro Module (Cro::HTTP::Router) when I have a minute. I’m pretty sure it’s what I need, although I am not certain.

Thank you!

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