Copied to clipboard

Flag this post as spam?

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


  • Nik 1617 posts 7263 karma points MVP 7x c-trib
    Nov 06, 2018 @ 11:42
    Nik
    0

    Overriding content blocks

    Hi,

    Firstly, awesome package, really enjoying using it.

    I've having an odd issue with content overriding. I've installed the "starter kit" and have been playing around. I've added a settings data type that allows me to configure the rotation of a content block.

    What I'm then doing is rotating the original content block (which is a text block) on the Extra Large view point (this filters down to the other sizes).

    I'm then going to the Large view point, going into the content block, going to settings and clicking "override" to remove the rotation at this level.

    What is happening is that the css isn't hiding the default render for the Large break points. As a result I'm getting duplicate content showing, i.e. the rotated default block, and the non-rotated overridden block.

    confession: I've not looked into it in detail just wondered if this is meant to be the expected behaviour as I wouldn't have thought it should be.

    Umbraco 7.12.3, package installed via nuget, Positional content starter kit installed as local package.

  • Phil Whittaker 63 posts 267 karma points MVP 4x c-trib
    Nov 06, 2018 @ 11:45
    Phil Whittaker
    0

    Hi

    Thanks for taking a look!

    Which version are you using? I did fix an issue with settings overriding recently so it might be fixed in the latest version.

  • Nik 1617 posts 7263 karma points MVP 7x c-trib
    Nov 06, 2018 @ 12:21
    Nik
    0

    Hi Phil,

    I installed via nuget which installed version: 1.0.8

    After I did the nuget install I downloaded the starter kit 1.0.0.1 from here so I could get a feel for what doc type setup should be like as that wasn't part of the nuget install. I assumed that installing the starter kit doesn't override the dll side of things?

    Nik

  • Phil Whittaker 63 posts 267 karma points MVP 4x c-trib
    Nov 06, 2018 @ 12:28
    Phil Whittaker
    1

    Hi Nik

    Ok, I'll take a look tonight and see if I can replicate!

  • Nik 1617 posts 7263 karma points MVP 7x c-trib
    Nov 06, 2018 @ 12:56
    Nik
    0

    No worries, if you need more info etc drop me a DM on twitter if I'm not responding quickly on here :-) @hotchillicode :-)

  • Nik 1617 posts 7263 karma points MVP 7x c-trib
    Nov 06, 2018 @ 14:32
    Nik
    0

    Hi Phil,

    Been looking into this a bit further and basically it looks like your function DimensionContentSetting in the PositionalContent.cshtml partial isn't checking if the settings have been overridden:

    if ((d.Value.OverrideContent && d.Value.HasContent) || d.Value.Hide)
    

    By changing it to:

    if ((d.Value.OverrideContent && d.Value.HasContent) || (d.Value.OverrideSettings && d.Value.HasSettings) || d.Value.Hide)
    

    I get the expected behaviour, but I haven't tested knock-on effects of this, just thought it might help your replication test later :-)

    Nik

  • Phil Whittaker 63 posts 267 karma points MVP 4x c-trib
    Nov 07, 2018 @ 07:10
    Phil Whittaker
    1

    Thanks Nik

    I replicated this issue last night and have implemented your fix (thanks).

    I've just released a new version.

    Phil

Please Sign in or register to post replies

Write your reply to:

Draft