Joomla 3.x 前台 content category 單一分類列表套用後台的排序方法

打開 components/com_content/views/category/tmpl/default_articles.php在檔案最頭的 $listDirn 下一行貼上以下程式碼: 1234567$saveOrder = $listOrder == 'a.ordering';if ($saveOrder) ...

Posted on  | 0 Comments

Joomla 3.x 前台 Content Category List 啟用發佈選項

Joomla 3 內建前台沒有像後台列表頁一樣有發佈按鈕可以快速切換,可以使用以下方法在前台列表頁啟用發佈按鈕喔! 打開你的前台列表頁,將發佈按鈕的 HTML 貼在你要的表格上12345678910<?php $menu = JFactory::getApplication()->getMenu(); $active = $menu->getActive(); $it...

Posted on  | 0 Comments

Joomla 3.x 使用中文別名

登入後台 -> 全站設定 -> 網站 -> Unicode 別名 -> 選擇「是」 選擇完後去新增一篇文章,就會發現別名可以使用中文啦!!

Posted on  | 0 Comments

Joomla 3.x 非 Content 元件欲使用 Content 文章的呼叫方法

如果在自訂的元件中需要呼叫 content 某分類的文章,可以使用以下的呼叫方式: 12345678JLoader::import('joomla.application.component.model');JModelLegacy::addIncludePath(JPATH_SITE.'/components/com_content/models',...

Posted on  | 0 Comments

joomla utf8 字串處理、非 local 引用其他元件 model

使用 utf8 相關字串處理:123jimport('phputf8.utf8'); utf8\_strlen($str):計算字數長度。 utf8\_substr($str, $offset, $length):截字 在 controller 以外的其他地方載入非屬於本 view 的 model:123$control = New JController();...

Posted on  | 0 Comments