Hey Cyllo community! Anyone know how to set up a public webpage in Cyllo? I'm struggling a bit.
Welcome!
Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.
This question has been flagged
Here's how you can create a simple website in Odoo 18 using a controller, template, CSS, and JavaScript. This example provides a basic structure to get you started. Website Controller - Defines HTTP routes and logic for rendering web pages.
from odoo import http
from odoo.http import request
class WebsiteExample(http.Controller):
@http.route('/my_website/home', type='http', auth="public", website=True)
def home_page(self, **kw):
return request.render('my_website_module.home_template', {})
Website Template
Defines the structure of your page using QWeb
Welcome to My Website
This page was built using Odoo.
This CSS file adds basic styling for the website front-end, enhancing the readability and structure of your content. It improves layout spacing, typography, and overall visual clarity for custom pages.
.body {
font-family: 'Segoe UI', sans-serif;
background-color: #f5f7fa; color: #333;
}.container {
margin: 40px auto; padding: 30px; background: #fff; border-radius: 8px; max-width: 800px; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}h1 { color: #005bbb; margin-bottom: 20px; }
p { font-size: 1.1rem; line-height: 1.6; }
This script demonstrates frontend behavior that triggers on page load and logs a message to the browser console.
import publicWidget from "web.public.widget";
publicWidget.registry.WelcomeWidget = publicWidget.Widget.extend({
selector: '#welcome',
start() {console.log("Welcome to the custom website page!"); },
});