Author Topic: Return value  (Read 2512 times)

Offline Shefra

  • Posts: 90
  • Gender: Male
Return value
« on: June 22, 2012, 10:15:02 AM »
Hello, i 'm unfamiliar with droplets and maybe is this question ask before.

Is it possible to add the return value into a variable?

Thanks in advance

Offline BlackBird

  • Posts: 2573
Re: Return value
« Reply #1 on: June 22, 2012, 10:53:43 AM »
I don't understand what you're after. Can you explain it a little bit more?

Offline Shefra

  • Posts: 90
  • Gender: Male
Re: Return value
« Reply #2 on: June 22, 2012, 12:25:29 PM »
Normally when you call a function you can place the return information into a variable like:

$variable = function();

So the the variable $variable get the value of the function

Offline DarkViper

  • Forum administrator
  • *****
  • Posts: 3062
  • Gender: Female
Re: Return value
« Reply #3 on: June 22, 2012, 01:17:24 PM »
Droplets are not functions to call somewhere in your template.

Droplets are dynamical outputfilters only.
They only generating replacements for a search-replace-function which will be executed in the last moment, before the content is sent to the browser.

If you need functions to return values for advanced use during runtime of your template, then you must use 'snippets'.

See:  Additional functions (code snippets)
Der blaue Planet - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen

"You have to take the men as they are… but you can not leave them like that !" :-P
Das tägliche Stoßgebet: Oh Herr, wirf Hirn vom Himmel !