Closed JimmyAustin closed 7 years ago
It currently tries to get the content of the very first structure partable that's created. Often this is a Spina::Line. The build_structure_parts
method in pages_helper.rb
initializes all these parts in the order of the theme initializer. We should probably look for a way to do the same for the name of each structure item.
At the moment the name of each structure item displayed on the backend will change randomly. Basically if you have a structure with 3 different parts (say, name, description and date), the side selector for the structure will choose 3 different random parts to use on the sidebar. This looks like it might be due to line 12 in _form.html.haml
The structure parts will return in a random order from the database, so getting the first of the array will return a random object. A hacky fix can be implemented by adding in a order like so
But ideally it should look at the structure definition in the theme initializer and use the content of the first path.
Let me know if you need any clarification.