Adding a file into Short description

cgan

Avatar: cgan

2008-10-28 00:17

How can I add a file ($sFilesList) into Short Description?

» Quick.Cms v2.x

cgan

treewood (OpenSolution)

Avatar: treewood

2008-10-28 08:17

hmmm ... this is not easy to made and it will perhaps overload server

cgan

Avatar: cgan

2008-10-28 11:04

I want each subpage to show up like a list like this when I click on a certain parent page:

The name of the subpage (this should not be linked)
Short text from shortdescription
my_added.pdf

( I want the added file to show up just below the text in short description for each sub page)

cgan

treewood (OpenSolution)

Avatar: treewood

2008-10-29 07:50

edit core/pages.php and find function listSubpages(). before this:
$oTpl->setVariables( 'aData', $aData );
put this:
$aData['sFilesList'] = $oFile->listFiles( $sFile, $aData['iPage'] );

After put: $aData['sFilesList'] to templates/pages_default.tpl to block: SUBPAGES_LIST_2

Maybe it will works. I didn't test it. If not then solution will be harder.

cgan

Avatar: cgan

2008-10-29 09:40

treewood - Yes it works. Thanks. But it is very important to choose "List (name, description, photo)" for any Parent page to show subpages. If the Parent page has "List (name, description)" to show subpages, just a white screen will be displayed if I click on it. Everything will disappear.
Is there a way to solve that?

cgan

treewood (OpenSolution)

Avatar: treewood

2008-10-30 07:44

change in listSubpages this:
if( $iType > 1 ){
$oFile =& Files::getInstance( );
}
to this:
$oFile =& Files::getInstance( );

cgan

Avatar: cgan

2008-10-30 08:33

treewood - it works fine! Thank you very much.

cgan

Back to top
about us | contact