how can I create a plugin to do that?
Trustmaster |
|
---|---|
OK, if you know alias or id in your plugin hooking into header, you can learn page_cat for that alias/id with 1 sql query:
if (empty($c)) {
$where = empty($alias) ? 'page_id = '.(int)$id : "page_alias = '".sed_sql_prep($alias)."'";
$cat_row = sed_sql_fetchassoc(sed_sql_query("SELECT page_cat FROM $db_pages WHERE $where"));
$c = $cat_row['page_cat'];
}
$cat_title = $sed_cat[$c]['title'];
// OR
$t->assign('CAT_TITLE', $sed_cat[$c]['title']); May the Source be with you!
|