Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Joomla で現在のページの itemid を取得するには、javascript を使用する必要があります。これを行う方法はありますか?URLはsefなので、URLだけを使用することはできません...
バージョンについての言及はありませんが、私は過去にこれをPHPで使用しました。直接的なJavaScriptの方法はないので、それをスクリプトにエコーするか、非表示のフォームフィールドまたはその他のメカニズムに配置する必要があります。
$currentMenuId = JSite::getMenu()->getActive()->id ;