Copied to clipboard

Flag this post as spam?

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


  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Jan 20, 2015 @ 09:56
    Jeroen Breuer
    0

    Can't hide preview button

    Hello,

    I'm trying to hide the preview button with the following config but the button is still visible. 

    <?xml version="1.0" encoding="utf-8"?>
    <Rules>
      <Rule Type="HideButtons" Enabled="true" Names="preview" Users="" UserTypes="" ContentTypes="" Description="" />
    </Rules>

    I'm on 7.2.1. and already tried to restart the website in IIS and cleared all javascript cache.

    Jeroen

  • Alain 73 posts 520 karma points c-trib
    Jan 20, 2015 @ 12:49
    Alain
    100

    Fixed in version 0.3.0 too.

    Alain

  • vinegar 8 posts 25 karma points
    Mar 23, 2015 @ 13:25
    vinegar
    0

    I try to hide preview button too on 7.1. Where should I add the config?

  • Alain 73 posts 520 karma points c-trib
    Mar 23, 2015 @ 14:11
    Alain
    0

    Hi,

    The config file is located in the config directory:

    ~/Config/BackofficeTweaking.config

    With the rule below it should work:

    <?xml version="1.0" encoding="utf-8"?>
    <Rules>
      <Rule Type="HideButtons" Enabled="true" Names="preview" Users="" UserTypes="" ContentTypes="" Description="" />
    </Rules>
    

    Alain

  • vinegar 8 posts 25 karma points
    Mar 24, 2015 @ 11:32
    vinegar
    0

    Hi Alain,

    I'm using umbraco 7.1.6, BackoffficeTweaking 0.6.0. I've used dashboard in backoffice to hide Preview button. However it's not working...tried restarting app pool, clearing browser cache, modify web.config etc. 

    <?xml version="1.0" encoding="utf-8"?>
    <Config>
      <Rules>
        <Rule Type="HideButtons" Enabled="true" Names="preview" Users="" UserTypes="" ContentTypes="" Description="" />
      </Rules>
      <Scripts>
        <Script Name="example" Content="console.log('Hello world');" />
      </Scripts>
    </Config>

    Anything else I can try? 

     

    thanks

    Vinh

  • Alain 73 posts 520 karma points c-trib
    Mar 24, 2015 @ 13:09
    Alain
    0

    Hi Vinh,

    I have installed BackoffficeTweaking 0.6.0 on a clean install of umbraco 7.1.6 and it is working fine.

    Is it a clean install? If not, what other packages are installed (in order to be able to reproduce the error)?

    Are you logged in as an Admin user? Note that rules don't apply for admin users. You need to create a user that is not an Admin.

    Alain

  • vinegar 8 posts 25 karma points
    Mar 24, 2015 @ 13:16
    vinegar
    0

    Hi Alain,

    The only other package I have installed is the Txt Starter Kit. 

    I have created a Custom User Type and logged in as that user type. The only permission set for this user type is Browse Node. Which leaves only the Preview button and I'm trying to hide this preview button.

    thanks

    Vinh

  • Alain 73 posts 520 karma points c-trib
    Mar 24, 2015 @ 14:31
    Alain
    0

    Vinh,

    For me it works fine with the TXT Starter kit and the Custom User Type.

    What browser (and version) are you using?

    Before you said that you've used the dashboard in backoffice to hide Preview button. Could you check if the "ContentIds" attribute exists in the rule? The config file that you posted before doesn't include this attribute and it should include it if you are using the lastest version (v0.6.0), since the package adds it automatically.

    For instance:

    <?xml version="1.0" encoding="utf-8"?>
    <Config>
      <Rules>
        <Rule Type="HideButtons" Enabled="true" Names="preview" Users="" UserTypes="" ContentTypes="" Description="" ContentIds="" />
      </Rules>
      <Scripts>
        <Script Name="example" Content="console.log('Hello world');" />
      </Scripts>
    </Config>
    

    I think that the package is not being executed or something went wrong during the installation

    Could you reinstall the module and check that the clientdependency version has changed in the ClientDependency.config file.

    Alain

Please Sign in or register to post replies

Write your reply to:

Draft