I also need to put some things in divs dynamicly.
I work in a company (don't we all ?) i need to create some Organigrams ( pictures of people positioned according to there status/function ). One person can work in different areas. ( main field of work, but also a member of the board, a coach for the football team...) Every person has_one Picture, has_many Jobs, a name and function.
So i need to have the ability to make different Organigrams (no problem there) but sometimes i need to use the same person on diffent pages in different positions.
Now creating the whole DB (used Modeladmin) isn't the problem. I need to position de data. I can't use Sortorder because than i cannot place the same person on 2 different pages in different positions ( being the Chief on the main Job , but just a player in the football team).
Now i discovered the module sortable_dataobject where an Admin can sort divs in the frontend, that's kinda terrific !!! But it still depends on Sortorder. So one person can have only one Sortorder?
The second challenge (for me that is...) is that i don't know how to place all the people on one page ( being in rows and columns ).
I figured that if i create some kinda standard grid lets say 10 cells (divs) wide and 8 cells (divs) high all filled with a standard background...
I could then get the 'Persons' DataObject for that specifiek area of work ( that's already working fine, no problem there) and place them in the grid.
Since there are 80 standard divs and i replace maybe 10 or 20 of those with Persons i should be able to position them in the frontend by shuffling them (sort them) around the grid.
Well that's about it...
So in short terms;
1) How do i give one person differnent Positions on the page.
2) How do i create the grid so that it replaces the standard divs with the Persons divs.