Display shortdescription in tpl file

sikopat

Avatar: sikopat

2015-02-11 18:19

Hello. I am trying to display the short description of a particular page in my template .tpl file.

I have added the following to my theme/xxx.php file to display the short description from the page id 1

$aDataPage1 = str_replace( '|n|', "\n", $oPage->throwPage( 1 ) );

and to display the short description, i have added the following in my .tpl file

$aDataPage1[sDescriptionShort]

It all works, however, my log file returns the following error

PHP Notice: Use of undefined constant sDescriptionShort - assumed 'sDescriptionShort' in /var/www/vhosts/xxx/httpdocs/web/libraries/TplParser.php(182) : eval()'d code on line 2, referer: http://www.xxx.com

Any help as to how to fix the above would be much appreciated.

Thank you

» Quick.Cms v3.x

sikopat

boboo

Avatar: boboo

2015-02-11 20:29

Just do it as the server says:
$aData1['sDescriptionShort']
with ' apostrophes

boboo :-)

sikopat

Avatar: sikopat

2015-02-11 20:38

Thanks. i believe i have tried that already, and still got the error message. however, if i pull out the full description with $aDataPage1['sDescriptionFull'], there are no errors!

sikopat

Back to top
about us | contact