Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Anthony 3 posts 73 karma points
    1 week ago
    Anthony
    0

    Umbraco Node Relationships - Base Data (Modules & Blocks) and Base Pages

    Hi all,

    I'm hoping somebody within the community can help offer some guidance...

    I am a Product Owner and I inherited Umbraco when starting a new role last year. Unfortunately, we do not currently have dedicated technical support and we have a bit of a skills gap with respect to Umbraco. This is something I'm working hard to resolve over the next few months and beyond, but in the meantime I'm hoping the amazing community may be able to help.

    We are currently on version 7.6.11 of Umbraco - we are planning to upgrade to 8/9 over the next 6-12 months, but that's obviously going to take some time.

    To provide context, a high level summary of our setup is as follows:

    • Multi-site - many international websites hosted on the platform (including multi-lingual variants depending on country)
    • Using Courier
    • Component based template design (providing content editors with flexibility)

    I am trying to understand whether there is a way in Umbraco to programmatically understand document relationships when completing a save and publish event?

    For example, we have the concept of Pages, Modules and Blocks:

    Page and Module Relationships

    • A Page can have a 1-to-many relationship with Modules. We can attach these modules to a page, and decide on the sequencing / order of presenting of the modular components. This is achieved using the MTP property editor to attach such modules to the body of our core page template. We have designed many different types of module components, these are the basic building blocks of the body section of our pages.
    • A single module could be attached to multiple different pages
    • E.g. an example of a module which is attached to many pages is a Marketing email sign up module. For instance, this might be attached to multiple different product based landing pages

    Module and Block Relationships

    • A Module can have a 0-to-many relationship with Blocks. We typically use blocks where a greater degree of flexibility is needed - such as columns of content. Alternatively, if we have a relatively simple requirement and the module doesn't need to scale with a sub component structure, we typically use a Module without the need to create Blocks.
    • A single block could be attached to multiple different modules of the same type
    • E.g. an example of a Module which is made up of multiple blocks is an FAQ accordion module. This type of module could have 8 blocks attached, each representing a Q&A format, with each block representing a single Q&A

    Sorry for the long pre-amble, but think the above is important context to the questions I'm now going to ask.

    1. Block Editing: When making a change to a block and hitting save and publish, is there any way to programmatically understand how many modules the block is attached to, and what the URL path is for the modules the block is attached to? This would be then followed by.....
    2. Module Editing: When making a change to a module and hitting save and publish, is there any way to programmatically understand how many pages the module is attached to, and what the URL path is for the pages the module is attached to?

    In short, when making an edit to either a module or a block, we ultimately want to understand which page URL's have been updated as a result of the edits (as the save and publish is against modules or blocks in this case, rather than the Page URL).

    Hopefully someone may be able to help steer me in the right direction. Thanks in advance :)

Please Sign in or register to post replies

Write your reply to:

Draft