I'm not sure if what I want to do is possible or if it's the right way to do it. I have a content type with many fields and I need to display all of them in the content view but three of them inside a slider. So, I thought this could be done displaying all the fields inside the main body position (from the One template) and make the slider using the before render field writing the PHP code and put it in the top body position. The problem I have is that one of the three field is a groupX field and I need to make an array with the values of the field1 (file), field2 (image) and the groupx fields (could be from 0 to 20). I have been searching in the forum and in the tutorials and manuals but could not found how to get those fields values using the Before render field. I found examples to make a custom template but not to use the code pack and so far I understand the way to get the fields value is different in this case.
by this way:
in the content wiew, add your 3 fields nedeed for the slideshow in the position "Clear" Not visible but available in the array of fields.
Add a Freetext (wysiwyg empty) in the position where you want to dispmlay your slideshow.
Add a beforerender field and make your code for the slideshow here.
The purpose is to create the html code of your slideshow and to put it in the property "Value" of the freetext field.
To make your code, you can get the value of the three fields by this way:
$data1 = $fields['field_name1']->value;
$data2 = $fields['field_name2']->value;
To access to a groupX value it's the same, but you will get the string of the custom storage, so you must execute a preg_match_all on this string to get all nedeed values of the groupX in an array