How I can get value of ShortDesc. to index.php

KUKY

No avatar

2008-01-22 14:42

Hello all.
I need get value (in .tpl files it is "$aData[sDescriptionShort]") to index.php and working with this value in php code of index.php but I dont know what i must write to index.php, because when I write to index.php this variable "$aData[sDescriptionShort]" the value is empty but in .tpl files is full. Please help me with it what I must write to index.php to get this value "$aData[sDescriptionShort]". Thanks

» Quick.Cms v1.x

treewood (OpenSolution)

Avatar: treewood

2008-01-23 08:00

KUKY - You must use this variable in index.php after code

if( is_file$sActionFile ) )
  require 
$sActionFile;


It works

KUKY

No avatar

2008-01-23 21:11

treewood - Please can you write me a little of code in index.php when i would like to change $aData[sDescriptionShort] to $newvar and after it I work with $newvar and finally I use this variable in show_pages.tpl and "echo" it. Thanks, because I tested many combination in index.php but I don't know where I must write it and how to use it.

treewood (OpenSolution)

Avatar: treewood

2008-01-24 08:00

KUKY - ok ...
edit index.php
find

if( is_file$sActionFile ) )
  require 
$sActionFile;

after this code put this:

if( isset( $aData['sDescriptionShort'] ) )
$newvar $aData['sDescriptionShort']

Now You have Your $newvar

KUKY

No avatar

2008-01-24 21:48

treewood - Sorry for my questions but it don't works :-(
in index.php I find what You write and after it i put the code what You writeand after it I write my code:

if($newvar=="Ne"||empty($newvar)){$newvar="none";}
if (
$newvar=="Ano") {$newvar="block";}


and in show_pages.tpl I write this $newvar but if I look to page the variable is empty and I don't know why because if is short desc. empty in must write "none" and if is in short desc. Ne it must write too "none" and if Ano it must write "block" but it write nothing. Please help me.

treewood (OpenSolution)

Avatar: treewood

2008-01-25 08:21

KUKY - oh i understand ... if You want to display it in pages_show.tpl then You must dont edit index.php ... You write me to edit index.php but in this case if You want to display it in pages_show.tpl You must put code:
actions_clien/p_.php

Put code i send to You before

$content .= $tpl->tbHtml'pages_show.tpl''SHOW' );

KUKY

No avatar

2008-01-25 22:11

Oh thank You VERY MUCH!!! It works fine! Iam very happy. Thank you. You made VERY NICE CMS system. The best CMS system!

Back to top
about us | contact