Re: assign on assign

From: Date: Fri, 10 Aug 2001 13:27:15 +0000
Subject: Re: assign on assign
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1328@lists.php.net to get a copy of this message
I'm going to forward this to the list so that everyone can think about it. On Fri, 10 Aug 2001, BONNEFOND de CARDELUS Jacques wrote: > Hi Andrei! > > excuse me but i couldn't send you some code yesterday. > weel this is the part of the code. > > I want to make view an array 3 by 3 items and i would > like to use the register-function to make unvisible > the previous link and the next link respectively at > the start and at the end of the array > > > ////////////////////////// > // in the html code//// > /////////////////////// > > //this is a function_register that work well > // > {section name=sec1 loop=$ViewArray} > <TD BGCOLOR="#FFFFFF" colspan=1>{CR_menu > crid=$ViewArray[sec1].menu}</TD> > {/section} > //so i wanted to use it as well > //but with or without '$' it doesn't work, the tag > 'Previous' or 'Nest' is not recognized > //// > <TD BGCOLOR="#99CCCC" colspan=2>{Previous}</TD> > <TD BGCOLOR="#99CCCC" colspan=2>{Next}</TD> > ///////////////////////// > // in the php code ///// > //////////////////////// > > function getPreviousMenu ($params) > { > extract($params); > echo "<a > > href=main.php?menuAction=myCr.{$function}&function={$function}&offsetaction=-3&startoffset={$startoffset} > class=lienbold>Previous</a>"; > } > // > function getNextMenu ($params) > { > extract($params); > echo "<a > > href=main.php?menuAction=myCr.{$function}&function={$function}&offsetaction=3&startoffset={$startoffset} > class=lienbold>Next</a>"; > } > // if i try to make a print instead it doesn't work > any more > > //the smarty->assign doesn't transmit the parameters > // > $smarty->register_function("Previous","getPreviousMenu"); > $smarty->register_function("Next","getNextMenu"); > > $smarty->assign("function", $GLOBALS["function"]); > $smarty->assign("startoffset", $offset); > > ///////////////////////// > > I wish you could understand what i mean. > > Friendly > JACK > > ___________________________________________________________ > Do You Yahoo!? -- Vos albums photos en ligne, > Yahoo! Photos : http://fr.photos.yahoo.com -Andrei Commitment, n.: Commitment can be illustrated by a breakfast of ham and eggs. The chicken was involved, the pig was committed.

« previous php.smarty.general (#1328) next »