Usually I have one article per category and I think this is very common. The article title then equals the category name. So why not have this as default.
If you want it to be like that open this file:
/include/inc_tmpl/article.editsummary.tmpl.php
FIND THIS LINE
Code: Select all
$template_default['article']['imagelist_default_height'] = isset($template_default['article']['imagelist_default_height']) ? $template_default['article']['imagelist_default_height'] : '' ;
Code: Select all
//phalancs: load default article name if article title is empty (use category name):
if ($article["article_title"] == '') {
$sql = "SELECT acat_name FROM ".DB_PREPEND."phpwcms_articlecat WHERE acat_id=".$article['article_catid']." LIMIT 1;";
if($result = mysql_query($sql) or die ("error" . mysql_error())) {
while($row = mysql_fetch_assoc($result)) {
$cat_name = $row['acat_name'];
}
}
$article["article_title"] = $cat_name;
}