3070 Posts in 869 Topics by 651 members
|Go to End|
3 December 2009 at 5:33am Last edited: 3 December 2009 5:34am
hopefully this is the right place for my Issue.
My plan is to show a Page on a Page. ^^ Let me explain.
On many "normal" Pages i would like to have a complete form ( like a Page from type : UserDefinedForm ), lets say left from the normal displayed page. Or Maybe a Imagegallery or or or.
My first thought was, hm lets make something like
<% control Page(herecouldstandyourpagename) %>
$Content (... $Form,$UserdefinedForm...)
<% end_control %>
went through the code and found in UserDefinedForm.php at public function index
$content = str_ireplace('$UserDefinedForm', $form->forTemplate(), $this->Content);
'Content' => $content,
'Form' => ""
made then a function in page.php, got the wanted dataobject byid and hoped ... of course he coundnt handle it (like $this->Form (made short view in function form and and and)
k, lets make the template-function yourself, but when i viewed the dataobject like print_r(Dataobject::get_by_id("Page",ID)); in page.php, i realized that i dont get the data for the form. Viewed in the UserDefinedForm page (print_r($this))i have seen then my Form Object with its EditableFields in [_object_cache:protected] array ... also not really know how do handle this.
Searched and found a similar task with imagegallery http://silverstripe.org/all-other-modules/show/274300#post274300 , but as i understand it, the big difference is, that i cant access the data ( what would be the $ThumbnailURL for the imagegallery more or less).
Sure, a simple form somewhere to make isnt a problem. But not only that Userform has nice features, i would have all my forms in one place. It would be really awesome if it would be easy to control the $content-data from another page type in another,somehow.... .
I hope, its clear what i wish.
Anyone has a Solution/Idea/Hints ?
First of all simple solutions will be favoured
|Go to Top|