본문으로 건너뛰기
Skillpedia
API 및 서버 (백엔드)7.8k · #12827

skill-doli-website-edit

하는 일

이 스킬은 페이지 하나의 내용이나 템플릿처럼 데이터베이스에 저장된 Dolibarr 웹사이트를 바꾸는 방법을 설명합니다. Dolibarr 웹사이트를 운영하며 특정 수정이 필요한 사람을 위한 스킬입니다.

사용하는 경우

  • ✓Dolibarr 웹사이트 페이지의 텍스트나 HTML을 바꿔야 할 때.
  • ✓수정 전에 Dolibarr 데이터베이스에서 올바른 사이트와 페이지를 찾아야 하는 경우.
  • ✓웹사이트 템플릿이나 페이지를 재디자인이 아니라 최소한으로 바꾸고 싶을 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/Dolibarr/dolibarr/blob/develop/.agents/skills/skill-doli-website-edit/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“Dolibarr 웹사이트의 연락처 페이지 문구를 바꿔 주세요. 나머지 레이아웃은 그대로 두세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

데이터베이스에서 웹사이트와 페이지를 찾는 방법을 보여 준 뒤, 기존 HTML 구조와 CSS 클래스를 유지하는 최소한의 변경으로 저장된 페이지 내용을 수정합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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

자주 묻는 질문

웹사이트 파일은 어디에 있나요?

웹사이트는 데이터베이스에 있습니다. website 문서 폴더 아래의 파일은 생성된 사본이므로, 원본은 데이터베이스입니다.

전체 페이지를 다시 만드나요?

아니요. 요청한 최소한의 변경만 적용하고, 기존 구조를 유지합니다.

데이터베이스 접근이 필요한가요?

네. 수정은 웹사이트 테이블에 대한 SQL로 이뤄지므로 데이터베이스 접근 권한이 필요합니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
7.8k
순위
#12827
라이선스
GPL-3.0
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬