This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

zorogat5480
zorogat5480

Hello, I've created a 3 level content management plugin: Parent --> Child --> GrandChild. The models are developed so that Parent "hasMany" Children and Child "hasMany" GrandChildren, and they are related with the relative parent ID. Now in my Parent view update.htm, inside the controllers, I am using "relationRender('child')" to show all of the Children of a Parent. It works, and it shows the Children list related to a Parent. If I click on one of the Children a pop-up ajax box appears and I can update the name of the Children. What I'd like to do, is to remove this Ajax behaviour, and link these Children generated by the relationRender() to the relative Children controller, instead. I want to be able to link the first children of the list to /child/update/1 for example , so if I clicks on the Child, a list of all of his GrandChildren will be shown. In general, I don't understand how to change the behaviour of RelationRender().... I hope my explanation was clear enough :)

keystroke
keystroke

+1 I am trying to do the same thing. I have a book item, a book section item, and items that go into those sections. I need to disable the AJAX box, and have sections on the Book update.htm link to a Section update.htm which can then use the normal relationRender. Same issue in the same week. What a coincidence. Hope someone can help us figure this one out. Thanks... :)

zorogat5480
zorogat5480

Hi Keystroke, I have a temporary solution, that involves Jquery, and will make real programmers scream with horror... basically you Unbind the Ajax event on the page and then implement a redirect with an onClick event mind you this is a really dirty solution and could cause troubles down the road, but for the moment I don't have the time and knowledge to investigate the code behind relationRender():

http://pastebin.com/7nVdz5eE

keystroke
keystroke

Hey zorogat5480! I'll use it until someone proposes a permanent solution. Thanks for the tip!

maxDubovsky
maxDubovsky

I need the same thing... I'll try to dig something on that...

Last updated

Tschallacka
Tschallacka

Please use a partial in the relation render that renders a link/button/whatever that clicks through to the form where you wish to modify the grandchild. Much better than breaking the jQuery.

use $value to get the value of the grandchild in the partial, to be able to link through to the update field of the grand child.

Last updated

1-6 of 6

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.