• Resolved dpenny2

    (@dpenny2)


    1. I dont get OP solution (w or wo) your mods.She asked for a)filter based on cat, then b)cloud, then c)pagenation.
    Her 3 block do NOT use/follow that order. Her block are b,a,c.

    So I guess my Q here is what are the “blocks”. Are these declarative programming, or sequential? It seems to me (from looking at many samples) that sometimes [blah blah]is just supplying parameters, while
    other instances [alpha beta] is calling routines/fucntions/macros/etc

    2. In your “alternate solution” I can see how results of the first
    [blah blah] are passed to the second [….].

    I really dont get how solution#1 does same thing as solution#2.

    Maybe its as simple Q as “when/how/scope of” shortcode processing?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for digging into the earlier topic and for your questions. I hope I can clarify the earlier topic for you.

    You wrote “She asked for a)filter based on cat, then b)cloud, then c)pagenation.” What she asked for was a way to add a category filter to her three “blocks” (shortcodes). Her shortcodes are a) tag cloud, b) document gallery, and c) pagination controls for the document gallery. the “filter based on cat” is not a block/shortcode in her coding. My alternative added some parameters to the same three shortcodes.

    You wrote “my Q here is what are the blocks“. What she called “blocks” are simply custom WordPress shortcodes, in this case provided and processed by MLA. Each shortcode has a name. e.g., mla_tag_cloud or mla_gallery, and one or more parameters. MLA registers its shortcode names with WordPress and names a PHP function that will process each shortcode. WordPress parses the parameter list and then calls the appropriate PHP function in MLA, passing the parameters to it.

    The shortcode(s) in the page/post content are declarative. They happen to be processed in the order they appear in the content but this is a coincidence; they are not sequential. The only “routines/fucntions/macros/etc” used are in the PHP code that processes the shortcode.

    The shortcodes are processed from scratch each time the page/post is loaded in the server, i.e., each time the browser sends the URL to the server. You can see that the first shortcode (mla_tag_cloud) has an mla_link_href parameter that adds some query arguments to the URL(s) in the cloud. When a cloud term is clicked, the URL query arguments are accessed in the mla_gallery shortcode as “substitution parameters” (an MLA term), e.g., {+request:current_id+}. WordPress simply passes the text to MLA; MLA code parses the substitution parameter and looks for the “current_id” element in the PHP _REQUEST array.

    I am marking this topic resolved, but please update it if you have problems or further questions regarding the above explanation. I know MLA’s shortcodes and features like Content Templates and substitution parameters can be complex.

Viewing 1 replies (of 1 total)

The topic ‘combining taxonomies – REOPEN’ is closed to new replies.