I inherited a Joomla 2.5 university site.
There is a page with the university structure that looks like a tree. When the user clicks on one of the items, that item expands and everything else collapses. After a few click you may get this:
- Academic structure
- Rectorate
- Rector
- Vice-Rector of X
- Vice-Rector of Y
- John Doe
- phone
- John Doe
- Vice-Rector of Z
- Departments
- Programs
- Rectorate
- Administrative structure
- Governance structure
The people who worked on the site made 65 different articles for every possible expansion of the tree. Impossible to maintain auto-generated HTML, zero consistency, every page is misaligned beyond repair.
I will remove all the articles and make one page with an expandable tree. I already made a JSON of the structure and it's less than 1 MB (with the photos) so I will just load it collapsed.
I want people to just edit the JSON and not the article code itself. Therefore I need a script that will apply the correct formatting to different JSON trees. For example, all 'person' nodes should be styled the same way.
How do I enable JavaScript expandable tree in Joomla 2.5? I only have access to the Joomla admin panel, not the server itself. There's an option in the editor to enable tags, will that be enough? Are there any gotchas if I just insert some JavaScript into the Joomla article?
What should I use for the project? I was thinking of jQuery with jsTree.