Langsung ke konten
Skillpedia
API & server (backend)7.8k ยท #12827

skill-doli-website-edit

Fungsinya

Skill ini menjelaskan cara mengubah situs web Dolibarr yang tersimpan di basis data, seperti isi satu halaman atau templat. Skill ini cocok untuk orang yang mengelola situs web Dolibarr dan membutuhkan perubahan spesifik.

Kapan dipakai

  • โœ“Saat Anda perlu mengubah teks atau HTML sebuah halaman di situs web Dolibarr.
  • โœ“Saat Anda perlu menemukan situs dan halaman yang tepat di basis data Dolibarr sebelum mengedit.
  • โœ“Saat Anda menginginkan perubahan minimal pada templat atau halaman situs web, bukan desain ulang.

Link skill

https://github.com/Dolibarr/dolibarr/blob/develop/.agents/skills/skill-doli-website-edit/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/Dolibarr/dolibarr/blob/develop/.agents/skills/skill-doli-website-edit/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit โ†’

Contoh permintaan ke AI

โ€œUbah kata-kata pada halaman kontak situs web Dolibarr saya, dan biarkan tata letak lainnya tetap persis seperti sekarang.โ€

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Skill ini menunjukkan cara menemukan situs dan halaman di basis data, lalu mengedit isi halaman yang tersimpan dengan perubahan minimal yang mempertahankan struktur HTML dan kelas CSS yang ada.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Skill: Handle Dolibarr website edit

A Dolibarr website (module Website) is loaded into the database. It is NOT a set of static files: the source of truth is the database, and the files under documents/website/ are only generated artifacts.

Where the data lives

  • llx_website: the websites. Relevant columns: rowid, ref (site name, used as directory name), lang, fk_default_home, otherjs, othercss.
  • llx_website_page: the pages of each website. Relevant columns: rowid, fk_website, pageurl, title, lang, type_container, content (the HTML of the page), htmlheader (the <head> part).

To find the site and the page to edit:

SELECT rowid, ref FROM llx_website WHERE ref = 'mywebsite';
SELECT rowid, pageurl, title FROM llx_website_page WHERE fk_website = <siteid>;

Editing a page

Storage of page content

  1. Identify the website and the page (see queries above).
  2. To change the content of a page, edit the HTML stored in the content column of llx_website_page:
UPDATE llx_website_page SET content = '...new html...' WHERE rowid = <pageid>;
  1. The content is the HTML of the page body. Keep the existing HTML structure (containers, CSS classes) โ€” do not redesign or reformat the whole page, apply the minimal change asked for.

Page format

  • The type_container column can be page (common page), banner if this is just a part of a page included into a main page, blogpost if the page is a news article (fulle page or included into another page), or library if page contains only PHP functions, or setup for a page never shown to visitor but used to offer a form to setup the website, or other (usually a part of page included into a main page type page)
  • The content of each page must be organized using <section conteneditable="true" id="a unique id"> tags to separate each independant block of content.

Regenerating the .tpl.php file

The content column alone is not rendered directly. Each page has a generated file:

documents/website/<site-ref>/page<pageid>.tpl.php
  • <site-ref> is the ref of the website (directory documents/website/<ref>/).
  • documents is the Dolibarr documents root ($dolibarr_main_data_root from htdocs/conf/conf.php). With multi-entity enabled, the path is documents/<entity>/website/<site-ref>/.
  • After any change to the content column, this file MUST be regenerated, otherwise the change is not visible on the rendered site.

Important: the .tpl.php file is NOT a raw copy of the content column. It is built by dolSavePageContent() (in htdocs/core/lib/website2.lib.php), which wraps the page content with a PHP header, the page htmlheader, the website CSS and other PHP code. So never write the content value raw into the .tpl.php file.

Two ways to regenerate the file:

  1. Preferred, through Dolibarr code: call dolSavePageContent($filetpl, $website, $objectpage, 1) with the website object and the page object loaded from database, where $filetpl = $dolibarr_main_data_root.'/website/'.$website->ref.'/page'.$pageid.'.tpl.php'. This is exactly what the website editor does when saving a page. It can also be done by saving the page from the website editor UI (Website menu -> site -> edit page -> Save).
  2. Only if Dolibarr code cannot be executed: archive the old file first (see below), then regenerate the file with the same structure as the previous version, replacing only the part that carries the page content with the new value from the content column.

Archiving the previous version

Before rewriting page<pageid>.tpl.php, the existing file MUST be archived as:

documents/website/<site-ref>/page<pageid>.tpl.php.v<TIMESTAMP>
  • <TIMESTAMP> is the unix timestamp of the moment of archiving (this is the convention of archiveOrBackupFile() in htdocs/core/lib/files.lib.php, which moves โ€” not copies โ€” the old file and keeps the last 5 versions only).
  • Never overwrite or delete the old .tpl.php without creating this .v<TIMESTAMP> version file first.

Verification

After an edit, check that:

  1. The content column of llx_website_page contains the new HTML.
  2. documents/website/<site-ref>/page<pageid>.tpl.php has been rewritten (check its modification time).
  3. The previous version exists as page<pageid>.tpl.php.v<TIMESTAMP>.

If the site is served through the alias/container mode, also check that the alias file documents/website/<site-ref>/<pageurl>.php stil

Pertanyaan umum

Di mana file situs web disimpan?

Situs web tersimpan di basis data. File di folder dokumen situs web adalah salinan yang dihasilkan, sehingga basis data adalah sumber kebenaran.

Apakah ia akan membangun ulang seluruh halaman?

Tidak. Skill hanya menerapkan perubahan minimal yang Anda minta dan mempertahankan strukturnya.

Apakah ini membutuhkan akses basis data?

Ya. Pengeditan dilakukan dengan SQL pada tabel situs web, sehingga Anda perlu akses ke basis data.

Detail

Deskripsi asli dari pembuat

Handles instructions to edit a Dolibarr website loaded into the database. Use when the user tries to modify a website, a website template or the content of a website page.

repo: Dolibarr/dolibarr

Popularitas

Bintang GitHub
7.8k
Peringkat
#12827
Lisensi
GPL-3.0
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • โ€ฆ

Skill lain dari repositori ini

Skill serupa