หน้า¶
Odoo ช่วยให้คุณสามารถสร้างหน้าเว็บสำหรับเว็บไซต์ของคุณ และปรับแต่งเนื้อหาและรูปลักษณ์ตามความต้องการได้
เพจแบบ คงที่ มีเนื้อหาที่เสถียร เช่น หน้าแรก คุณสามารถสร้างเพจใหม่ด้วยตนเอง กำหนด URL ปรับเปลี่ยน คุณสมบัติ ฯลฯ ในทางกลับกัน เพจแบบ ไดนามิก จะถูกสร้างขึ้นแบบไดนามิก หน้าเพจทั้งหมดที่สร้างโดยอัตโนมัติโดย Odoo ตัวอย่างเช่น เมื่อคุณติดตั้งแอปหรือโมดูล (เช่น /shop หรือ /blog) หรือเผยแพร่ผลิตภัณฑ์ใหม่หรือโพสต์บนบล็อก จะเป็นเพจแบบไดนามิก ดังนั้น จึงมีการจัดการที่แตกต่างกัน
การสร้างหน้า¶
สามารถสร้างหน้าเว็บไซต์ได้จาก ฟรอนต์เอนด์ และ แบ็กเอนด์ ในการสร้างหน้าเว็บไซต์ใหม่ ให้ดำเนินการดังนี้:
เปิดแอป เว็บไซต์ คลิก + ใหม่ ที่มุมขวาบน จากนั้นเลือก หน้าเว็บ
หรือไปที่ และคลิก ใหม่
ใส่ Page Title ชื่อเรื่องนี้จะใช้ในเมนูและ URL ของหน้า
คลิก สร้าง
Customize the page's content and appearance using the website builder, then click Save.
Publish the page.
Note
ปิดใช้งาน เพิ่มไปยังเมนู หากไม่ต้องการให้หน้าปรากฏในเมนู
การจัดการหน้า¶
การเผยแพร่/ยกเลิกการเผยแพร่หน้า¶
Pages need to be published to make them accessible to website visitors. To publish or unpublish a page, access it and toggle the switch in the upper-right corner from Unpublished to Published, or vice versa.
Note
นอกจากนี้ยังสามารถ:
publish/unpublish a page from the page properties, where you can define a publishing date and/or restrict the page's visibility if needed;
publish/unpublish several pages at once: go to , select the pages, then click Action and select Publish or Unpublish.
โฮมเพจ¶
เมื่อคุณสร้างเว็บไซต์ Odoo จะสร้างหน้า หน้าแรก เฉพาะขึ้นมาตามค่าเริ่มต้น แต่คุณสามารถกำหนดหน้าเว็บไซต์ใดๆ ก็ได้ให้เป็นโฮมเพจของคุณ เมื่อต้องการทำเช่นนี้ ให้ไปที่ จากนั้นในส่วน ข้อมูลเว็บไซต์ ให้กำหนด URL ของหน้าที่ต้องการในฟิลด์ หน้าแรก URL (เช่น /shop)
Alternatively, you can define any static page as your homepage by going to . Select the Publish tab and enable Use as Homepage.
คุณสมบัติของหน้า¶
To modify a static page's properties, access the page you wish to modify, then go to .
The Name tab allows you to:
rename the page using the Page Name field;
modify the Page URL. In this case, you can redirect the old URL to the new one if needed. To do so, enable Redirect Old URL, then select the Type of redirection:
301 Moved permanently: to redirect the page permanently;
302 Moved temporarily: เพื่อเปลี่ยนเส้นทางหน้าชั่วคราว
You can further adapt the page's properties in the Publish tab:
Show in Top Menu: Disable if you don't want the page to appear in the menu;
Use as Homepage: Enable if you want the page to be the homepage of your website;
Indexed: Disable if you don't want the page to be shown in search engine results;
Published: Enable to publish the page;
Publishing Date: To publish the page at a specific moment, select the date, click the clock icon to set the time, then click the green check mark to validate your selection.
การมองเห็น: เลือกว่าใครสามารถเข้าถึงหน้าได้:
All
Signed In
Restricted Group: เลือก:doc:
กลุ่มการเข้าถึงผู้ใช้ </applications/general/users/access_rights>`ในฟิลด์ :guilabel:`Authorized groupWith Password: Enter the password in the Password field.
Tip
Some of these properties can also be modified from .
การทำซ้ำหน้า¶
หากต้องการคัดลอกหน้า ให้เข้าไปที่หน้านั้น จากนั้นไปที่ แล้วคลิก คัดลอกหน้า ป้อน ชื่อหน้า แล้วคลิก ตกลง ตามค่าเริ่มต้น หน้าใหม่จะถูกเพิ่มหลังหน้าที่ทำซ้ำในเมนู แต่คุณสามารถลบหน้านั้นออกจากเมนูหรือเปลี่ยนตำแหน่งได้โดยใช้ โปรแกรมแก้ไขเมนู
การลบหน้า¶
หากต้องการลบหน้า ให้ดำเนินการดังนี้:
เข้าถึงหน้า จากนั้นไปที่ และคลิก Delete Page
หน้าต่างป๊อปอัปจะปรากฏขึ้นบนหน้าจอพร้อมลิงก์ทั้งหมดที่อ้างอิงถึงเพจที่คุณต้องการลบ โดยจัดเรียงตามหมวดหมู่ เพื่อให้แน่ใจว่าผู้เยี่ยมชมเว็บไซต์ไม่ได้เข้าสู่หน้าข้อผิดพลาด 404 คุณต้องอัปเดตลิงก์ทั้งหมดบนเว็บไซต์ของคุณโดยอ้างอิงถึงหน้านั้น โดยขยายหมวดหมู่ จากนั้นคลิกลิงก์เพื่อเปิดในหน้าต่างใหม่ หรือคุณสามารถตั้งค่า redirection สำหรับเพจที่ถูกลบได้
Once you have updated the links (or set up a redirection), select the I am sure about this check box, then click OK.
การแมปการเปลี่ยนเส้นทาง URL¶
การทำแผนที่การเปลี่ยนเส้นทาง URL ประกอบด้วยการส่งผู้เยี่ยมชมและเครื่องมือค้นหาไปยัง URL ที่แตกต่างจากที่พวกเขาขอในตอนแรก เทคนิคนี้ใช้เพื่อป้องกันลิงก์เสีย เช่น เมื่อคุณ ลบเพจ, แก้ไข URL หรือย้ายไซต์ของคุณจากแพลตฟอร์มอื่นไปยัง Odoo โดเมน นอกจากนี้ยังใช้เพื่อปรับปรุง การเพิ่มประสิทธิภาพเครื่องมือค้นหา (SEO) ได้อีกด้วย
เพื่อเข้าถึงการเปลี่ยนเส้นทาง URL ที่มีอยู่และสร้างใหม่ เปิดใช้งานโหมดนักพัฒนา และไปที่
Note
A redirect record is added automatically every time you modify a page's URL and enable Redirect Old URL.
You can set up redirections for static and dynamic pages.
เพื่อสร้างการเปลี่ยนเส้นทางใหม่ ให้คลิกปุ่ม สร้าง จากนั้นกรอกข้อมูลในฟิลด์:
ชื่อ: ป้อนชื่อเพื่อระบุการเปลี่ยนเส้นทาง
การดำเนินการ: เลือกประเภทของการเปลี่ยนเส้นทาง:
404 ไม่พบหน้า: ผู้เยี่ยมชมจะถูกเปลี่ยนเส้นทางไปยังหน้าข้อผิดพลาด 404 เมื่อพยายามเข้าถึงหน้าที่ไม่ได้เผยแพร่หรือถูกลบ
301 Moved Permanently: for permanent redirections of unpublished or deleted static pages. The new URL is shown in search engine results, and the redirect is cached by browsers.
302 ย้ายชั่วคราว: สำหรับการเปลี่ยนเส้นทางระยะสั้น ตัวอย่างเช่น หากคุณกำลังออกแบบใหม่หรืออัปเดตหน้า URL ใหม่จะไม่ถูกแคชโดยเบราว์เซอร์และไม่แสดงในผลการค้นหาของเครื่องมือค้นหา
308 Redirect/Rewrite: for permanent redirections of existing dynamic pages. The URL is renamed; the new name is shown in search engine results and is cached by browsers. Use this redirect type to rename a dynamic page, for example, if you wish to rename
/shopinto/market.
URL from: Enter the URL to be redirected (e.g.,
/about-the-company) or search for the desired dynamic page and select it from the list.URL ไปยัง: สำหรับการเปลี่ยนเส้นทาง 301, 302 และ 308 ป้อน URL ที่จะเปลี่ยนเส้นทางไปยัง หากคุณต้องการเปลี่ยนเส้นทางไปยัง URL ภายนอก ให้รวมโปรโตคอล (เช่น
https://)เว็บไซต์: เลือกเว็บไซต์เฉพาะ
ลำดับ: เพื่อกำหนดลำดับในการดำเนินการเปลี่ยนเส้นทาง เช่น ในกรณีของลูกโซ่การเปลี่ยนเส้นทาง (คือชุดของการเปลี่ยนเส้นทางที่ URL หนึ่งถูกเปลี่ยนเส้นทางไปยังอีก URL หนึ่ง ซึ่งถูกเปลี่ยนเส้นทางต่อไปยัง URL อื่นอีก)
สลับสวิตช์ เปิดใช้งาน เพื่อปิดใช้งานการเปลี่ยนเส้นทาง
Important
404, 301, and 302 redirections are meant to migrate traffic from unpublished or deleted pages to new pages, while the 308 redirect is used for permanent redirections of existing pages.
ดูเพิ่มเติม