Hari KT Posted November 20, 2013 Share Posted November 20, 2013 Hi Guys, I have a $field->type instanceof FieldtypePage . I want to know the template of the FieldtypePage . I have tried $template = $this->pages->get($field->parent_id)->template; I am getting a different template than the one I really need. $fieldpage = new Page(); // $fieldpage->template = $name; // Is there something like without assigning template name I can save a page ? // $fieldpage->template_id = $template_id $fieldpage->title = 'title'; $fieldpage->body = 'body'; $fieldpage->parent_id = $field->parent_id; $fieldpage->save(); Link to comment Share on other sites More sharing options...
WillyC Posted November 20, 2013 Share Posted November 20, 2013 feldtypepage only.have tamplate if u.set ones in feild setting but if u did $t=$templates->get($field->template_id); 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now