new column in admin-gui for general page overview

kuzco

Avatar: kuzco

2011-11-15 12:56

Hello,
I want to have an additional column in the general page view in the admin panel.
In the moment, you will see: id, name, position, status and options.
I want to have also the theme name (default.php, ... - file from /templates/admin/*.php) in this overview.

I know that I have to edit /templates/admin/pages.tpl, but unfortunately I am missing some information. I have already increased colspan from 5 to 6, but what are the line I have to put in BEGIN_LIST ?
For pagename it is
<th class="name">
<a href="?p=$aActions[f]-form&amp;iPage=$aData[iPage]">$aData[sName]</a><a href="index.php$aData[sLinkName]" target="_blank" class="preview"><img src="$config[dir_templates]admin/img/ico_prev.gif" alt="$lang['preview']" title="$lang['preview']" /></a>

I believe it is something with sTheme or aTheme.

Entry for BEGIN_HEAD is clear.

many thanks
kuzco

» Quick.Cms v3.x

boboo

Avatar: boboo

2011-11-15 14:47

Hi Kuzco,
you can do it as follows:
add in /templates/admin/pages.tpl in block BEGIN_LIST
right before:
<td class="position">
add this:
<td class="name">$aData[sTheme]</td>
of course 'colspan' and other view-formatting things are to do.
then in /core/pages-admin.php
find function listPagesAdmin
and under:
$oTpl=TplParser::getInstance();
put:
$oFF=FlatFiles::getInstance();
and then under:
$aData['iDepth']=0;
put:
$aDataTemp=$oFF->throwDataFromFiles(array(DB_PAGES_EXT),$aData['iPage'],'iPage');
$aData['sTheme']=!empty($aDataTemp['sTheme'])?$aDataTemp['sTheme']:'default.php';

the same procedure is to do in listSubPagesAdmin
That's all

strzelectwo.kimla.de

kuzco

Avatar: kuzco

2011-11-15 20:38

boboo,
many thanks for this explanation. It is working like expected.

regrads
kuzco

Back to top
about us | contact