My problem is that I use php template and function there that returns for ex. "some text",
and in .ss file when i use <% some_kind_edit_function %>$name_of_function<% end.. %>
"some text" is always writed in the top of html page. Probably I could use html tags and css to position this, but some problems would stay. Has somebody had the same problem. knows how?I want It to be always in place where I wrote It in .ss file.....??
Actually if you've got a function in your Controller which returns a string, you can use "$name_of_function" in the associated template without the "<% %>" tags. However, I'm never sure to write that function in the Controller or into the Page so you got to have some fun with try and error.
And regarding to your Text positioned at the top of the page, I don't know if this is the case here, but this usually occcurs when having an echo in your Control-Function, so maybe you check out your PHP-code and your way to use that Control in your template.
yes if you are returning a string from a PHP function echoAString() then make sure it returns rather then echos the string.
FlorianH - all methods that you want to call from templates should be in the controller part of the class. As the Controller is the one that controls the templates. You can put methods in the Page part and call them from the Page_Controller if you need.
Actually, I would recommend putting them in the model class. This is closer to the database and it's easier to manipulate data, while still being able to directly call those functions in the template.
Adding lots of data related methods to the controller gives it too much responsibility for managing data. Also, you run into some issues like having to call $this->dataRecord to get the model record in order to get data from it, when the method could just go on the model instead. The template can still see all those methods on the model class thanks to a handy system called ModelAsController.
My problem was echo function. Thanks a lot. But I return It in function readfile() imported from place that source is not accesible. I will rather use other function to get data, but most important to me was that echo is in the top.Right function was implode().