Quote from: mmjaeger at Oct 09, 2008, 03:43 PM
Hello
I think I got my glossary to work fairly well by just using a single document and some javascript as can be seen here:. what I don’t see however how I could show e.g. a random term with its definition on the front page. if somebody has an idea how to achieve this, please let me know.http://localhost/sites/boersenschule.ch/index.php?id=27
thanks
Hmmmm, do you have a link to a live site? The link you provided is to your local computer
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« Execution of a query to the database failed - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’`taurasblaz_66`.`modx_site_content`.parent = 49’ at line 1 »
SQL: SELECT `taurasblaz_66`.`modx_site_content`.id, `taurasblaz_66`.`modx_site_content`.pagetitle FROM `taurasblaz_66`.`modx_site_content` WHERE ( `taurasblaz_66`.`modx_site_content`.pagetitle LIKE ’T%’) `taurasblaz_66`.`modx_site_content`.parent = 49
Here ya go. Not exactly ready for the public but it is not too complicated. Some of the options are hard codded (to fit my specific requirements) but I am sure you can understand it by looking at the code. There is basically one part that displays the letters with links and another part that runs ditto using a filter to get the results.
In this version there are only links on the letters that have results, if no results then no active link on the letter.
We can work on getting this ready for the masses mostly by adding some documentation.
I use it like [!ditto_a2z!]] and code the options in the snippet but you can set the tpl and parent in the call as well [!ditto_a2z? &parent=`123` &tpl=`someChunk`!]. I think that I even added pagination but not sure.
It is mostly ditto in a wrapper snippet.