We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22797
    • 134 Posts
    This is an auto-generated support/comment thread for Flexible Site Index.

    Use this forum to post any comments about this addition or any questions you have regarding its use.

    Brief Description:
    Flexible Site Index allows you to create a site index that is hierarchical, customizable, stylable, and (X)HTML compliant.
      • 7231
      • 4,205 Posts
      This looks cool. Good job with the documentation. grin
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don't know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 8960
        • 150 Posts
        Man, this is great!!! Been waiting for something like this to come along! 5 Stars!
          • 18367
          • 834 Posts
          Followed the instructions but I get this error when I try to load the page

          The template variables could not be found by the names given.


          Here’s my call
          [[FlexibleSiteIndex]]


          Any tips?
            Content Creator and Copywriter
            • 22797
            • 134 Posts
            Quote from: markg at Sep 25, 2008, 07:43 PM

            Followed the instructions but I get this error when I try to load the page
            The template variables could not be found by the names given.
            Here’s my call
            [[FlexibleSiteIndex]]

            Any tips?
            Double check to make sure the name of your template variables exactly matches the name of the template variables in the configuration file. The default names are site_index_show and site_index_term. You can use whatever names you like, but if you do, you’ll have to modify the default names in the configuration or else add the custom names to your snippet call, e.g.:
            [[FlexibleSiteIndex? &index_text_tmplvar_name=`your_custom_name` &include_in_index_tmplvar_name=`your_other_custom_name`]]
              • 22797
              • 134 Posts
              ... Also, make sure that you customize any other settings if necessary, such as the prefix for the database. The default value for the modx_table_prefix parameter is "modx_". The error message mentioned above occurs when the query for values in the template variables is empty, which could be a result of 1) no values being entered in the specified template variables, 2) searching in the wrong template variables, or 3) searching in the wrong table. Double checking your configuration parameters should solve it.
                • 18367
                • 834 Posts
                OK,

                I do have a different database, so I changed one instance of it in the snippet and it’s working now.

                New question:

                Can I set this so that the default is to include the page in the index? I have an existing site and I don’t want to edit hundreds of pages just to make them all appear in the index.

                The note in the install instructions seemed too suggest this couldn’t be done. Is that correct?
                  Content Creator and Copywriter
                  • 22797
                  • 134 Posts
                  An updated version of the snippet has been posted at http://modxcms.com/Flexible-Site-Index-1.1-2209.html

                  What’s New:


                  • IMPORTANT: The default name for the index_text_tmplvar_name parameter has been changed to site_index_terms (with an "s" on the end). If you set this snippet up previously, you will need to either change the name of your template variable, or change the default parameter value.
                  • Added the ability to include all documents, or include all but a few documents, using the scope_of_site_index parameter
                  • Added the ability to group entries that start with numbers in a combined heading, with a default name of "Numbers" (you can change the name with the num_heading parameter)
                  • Added a filter for common non-alphabetical characters (&, ", ’, etc) so that these are ignored in the top level alphabetization.

                    • 22797
                    • 134 Posts
                    ... As luck would have it, there were a couple of minor bugs in the filter for non-alphanumeric characters in the latest release (1.1), so I uploaded a corrected version as 1.1.1 (available from the same link in the above post).

                    If you’re specifying the terms by typing in the template variable, and you are already avoiding non-alphanumeric characters  (e.g. *, ", %, +, etc.) at the beginning of the terms, you probably don’t need to upgrade. But if some of the terms have titles that start with non-alphanumeric characters, the updated filter may help with alphabetization, because the filter ignores those characters.  (These characters are more likely to be an issue if you use the fallback pagetitle or menutitle fields instead of the template variable).
                      • 22797
                      • 134 Posts
                      I’ve been busy working on this script today. I reworked the code base in an object/class format and added new functionality:


                      • Added pagination functionality
                      • Increased the taxonomy hierarchy limit to 10 levels deep
                      • Added the ability to show only the alphabetical links, without the list of terms
                      • Added the ability to put a second list of alphabetical links at the bottom of the site index terms
                      • Added the include_privateweb parameter
                      • Fixed bugs with the default values for the include_deleted and include_published parameters
                      Download at: http://modxcms.com/Flexible-Site-Index-2189.html