• Resolved Parmen

    (@parmen)


    @nwjames

    Dear Neil,

    Pardon my heuristic zeal, but I wonder can we have a dynamic mix-up of terms from two taxonomies so that we could append any term from taxonomy2 to the terms of taxonomy1 in a kind of dynamic hierarchy? Or vice versa.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author nwjames

    (@nwjames)

    @parmen
    Thanks for the question.

    The data model is shown here:

    Being candid, I don’t fully understand the problem that you’re trying to solve.
    It would be helpful if you could give some examples of what you are trying to achieve.

    Looking at the data model, technically a taxonomy term in taxonomy A could have a paremt that is in Taxonomy B since it only has the ID to link them together, however what WordPress functionality would do with it is anyone’s guess. You could try it and see, but, since this is outside the designed functionality even if you find it works as you wish. a future fix could render it useless.

    Regards,
    Neil

    Thread Starter Parmen

    (@parmen)

    @nwjames

    This is a purely theoretical question, outside the scope of your application, but I am interested in it as a science methodologist and ontologist

    Suppose we have two taxonomies

    1. Domains
    2. Topics

    Let domain terms be cities, and topical terms – different services. With the present WP breadcrumbs logic, we can create paths only with terms of one taxonomy. What we are looking for is this

    Home > State > City > Services
    Listing all available topics for that City to choose from

    Home > State > City > Services > Plumbing
    Listing all available posts for that particular city and that particular service

    In my case, not in WP, this has been achieved with the help of additional taxonomic controls to limit the results, but the path still remains “unitaxonomic”

    https://www.topmarket.art/books/mind/philosophy/history-of-philosophy/indian-philosophy/

    I have found also that the term Dynamic Hierarchy is used in Oracle but didn’t check what it means for them, not my piece of cake…

    Plugin Author nwjames

    (@nwjames)

    @parmen,
    Thanks for raising this. As you said it is outside the current plug-in context, but no matter.

    I took a look at how WP plug-ins treat breadcrumbs – they seem to use a hierarchical structure within a single taxonomy, laying out the parents as they go.

    I will try to look at what would be required in a WP context.

    Looking at your real-world, but non WP, example, imagine that it were WP, then the rewrite rules would need to parse
    https://www.topmarket.art/books/mind/philosophy/history-of-philosophy/indian-philosophy/
    into something like
    https://www.topmarket.art/index.php?type=books&class=mind&subject=philosophy&group=history-of-philosophy&section=indian-philosophy
    to get the query sorted.

    With dynamic groupings, you cannot assume that a 5-level query will map to these specific taxonomies, so you might need to add an additional element to identify which mapping you want.

    However books may be sufficient to do this parsing. That is, does the fact that books is present as the first level mean that I can uniquely parse the query?

    If not, then you might need to add something to be able to select the appropriate rewrite rule to be invoked. On the other hand, if I know that books is unique, then I can parse https://www.topmarket.art/books/mind/philosophy/ to give me a larger grouping.

    Some 30 years ago, I helped to build an ERP system for a multinational company that addressed what you refer to. Essentially it allowed you to define tree structures on top of the normal reference data. The latter were things like Party (e.g. Company, Business Unit), together with Locations and Materials. Then you could define a tree structure that had a specific elements of different types at the different levels of the tree. So one tree would define which locations a Company would use. Some locations would be used by many companies so would appear multiple times. Another would define the valuation method to be used for different products.

    You needed to have a pretty clear head when putting this together and was quite complex – and that was without having to think about any rewrite rules.

    In a WP world, it may be sufficient to have appropriate rewrite rules to get what you want and to create the corresponding breadcrumbs on the rendered page rather than actually trying to create the actual data structures.

    Hope this gives some ideas.

    Neil James

    Thread Starter Parmen

    (@parmen)

    Thank you for the elaborate answer, Neil – it does really help.

    In the real=world example of mine, the terms down to Indian Philosophy are elements of one taxonomy, while what follows after makes the entire thing a dynamic hierarchy

    https://www.topmarket.art/books/mind/philosophy/history-of-philosophy/indian-philosophy/?features_hash=28-5_29-70-99_30-53

    feature 28 stands for the taxonomy Language, and the term 5 of it is English

    Feature 29 is the taxonomy Condition, and

    Feature 30 is the taxonomy Country of Origin, the term 53 being Bulgaria

    We can use any of the additional taxonomies to serve as filter for any level of the basic taxonomy, and to append further taxonomic filters.

    It is indeed matter of rewrite rules to make the additional taxonomies readable in the URL.

    I believe the classifieds directories of Naspers are built in this way.

    Seems that WP Search & Filter plugin is doing this for WordPress, and it takes account of all custom taxonomies created with the help of your STR plugin.

    Thanks again for developing it!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Dynamic Hierarchy’ is closed to new replies.