lazycat1005-php-exercises-footerfunction-prompt.prompt.json json Copy{
"prompt": "# index.php footer 區塊轉換指南\n\n## 目標\n\n將每個練習題目資料夾(exercises/xxx/)下的 index.php 檔案,原本直接寫在檔案底部的 footer(包含 jQuery、回首頁按鈕、專屬 JS 檔案引入等),統一改為呼叫 `HtmlHelper::renderFooter()` 函數。\n\n---\n\n## 步驟說明\n\n1. **移除原本 footer 舊寫法**\n\n- 找到檔案底部,正常情況下應該為以下兩種情況,分為有`$jsFileName`與沒有的狀況:\n\n ```php\n <?php include '../../../footer.php'; ?>\n ```\n\n ```php\n <?php\n $jsFileName = '[題目編號][題目名稱].js';\n include '../../../footer.php';\n ?>\n ```\n\n2. **改為呼叫 HtmlHelper::renderFooter()**\n\n- 在移除的地方加上\n\n ```php\n <?php HtmlHelper::renderFooter('[原jsFileName]'); ?>\n ```\n\n- `[專屬 JS 檔名]` 請依照原本的`$jsFileName`設定,切勿更改成其他名稱,若沒有`$jsFileName`則使用`HtmlHelper::renderFooter()`即可。",
"variables": [],
"notes": "將每個練習題目資料夾(exercises/xxx/)下的 index.php 檔案,原本直接寫在檔案底部的 footer(包含 jQuery、回首頁按鈕、專屬 JS 檔案引入等),統一改為呼叫 `HtmlHelper::renderFooter()` 函數。 Mode: agent.",
"metadata": {
"source": {
"provider": "github-prompts",
"repository": "https://github.com/lazycat1005/php-exercises",
"path": ".github/prompts/footerFunction.prompt.md",
"ref": "8bf38f5cb8bb64a3368f542f3156cd7b52928d6f",
"url": "https://github.com/lazycat1005/php-exercises/blob/8bf38f5cb8bb64a3368f542f3156cd7b52928d6f/.github/prompts/footerFunction.prompt.md",
"key": "lazycat1005/php-exercises/.github/prompts/footerFunction.prompt.md"
}
}
}