Copied to clipboard

Flag this post as spam?

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


  • David Zweben 268 posts 753 karma points
    Dec 23, 2013 @ 21:25
    David Zweben
    0

    Polygot 2.0 with 'Overflow' starter kit type structure?

    Hi,

    I'm planning to make a site that will need both a modular, block-based structure on the pages, similar to the Overflow starter kit included with Umbraco 7, and 1:1 localization.

    I really like the way that the Overflow starter kit structures its pages: It stores most of the content for each page in sub-nodes that don't have templates, and loops through them looking for an associated partial view that adds the content to the template. This way, editors not only have control over content in a block, but can sort and repeat blocks as they wish, per-page. I'm not sure how this would work with Polygot, though.

    If you're not familiar, here's an excerpt from the Overflow source code that explains nicely:

    The template is a single page website, but we still want to be able to add block of content in a variable way in there. This is being done by adding children under the homepage and looping through them and then rendering them with a specific partial view. In this foreach loop we dynamically find the appropriate partial based on the alias of the document type for the child.

    So if the child node has a document type with the alias "umbTextPage", we would Render the partial "umbTextPage" for that child node. This way we can easily add multiple "umbTextPage" children, or multiple "umbFeature" children, and so on.

    @foreach (var child in Model.Content.Children) {
    Html.RenderPartial(child.DocumentTypeAlias, child);
    }

    Is it possible to use Polygot with this sort of block-based page structure? If not, is there any alternate way that a site can be built using Polygot that allows editors to add and edit vertically stacked blocks of content in a way that can be adjusted per-page?

    Thanks,
    David

  • dimi309 245 posts 579 karma points
    Dec 23, 2013 @ 22:14
    dimi309
    0

    Hi David,

    I assume that this will work with Polyglot. Using the example above, you could create the translation document types for umbTextPage and place property translations in its corresponding partial view (using the property translation macro).

    I have to admit that I have not tried the Overflow starter kit though, so perhaps I am missing something. Please let me know if you encounter any problems and I will look into it.

    Best regards,

    Dimitri

  • David Zweben 268 posts 753 karma points
    Dec 23, 2013 @ 22:39
    David Zweben
    0

    Hi Dimitri,

    I don't think you're missing anything; the text I quoted above explains pretty much everything. I just haven't used Polygot yet, so I wasn't sure if there were any complications to doing things this way. If you think it should work, my only other concern is that it seems like there would be a lot of extra document type and translation page creation, since it would be several for each page instead of just one, but I guess I'll have to try it out first to see how much that matters.

    Thanks for the quick reply!

    Regards,
    David

  • dimi309 245 posts 579 karma points
    Dec 23, 2013 @ 23:05
    dimi309
    0

    Hi David,

    You're welcome! And indeed, I see your point. About having to create many document types, I am afraid that that's just how the package works... About having too many nodes on the content tree, I have worked with complex content trees before and I've found that assigning a folder icon to the translation folder document types was a great help in having a sense that the translations were staying out of my way. I hope the same works for you. In any case, like I've said, if you find any difficulty in using the package, or if you have any ideas about how to improve it, let me know and I'll see what I can do :)

    Best regards,

    Dimitri

Please Sign in or register to post replies

Write your reply to:

Draft