• Resolved scarlywebs

    (@scarlywebs)


    Hi Uipress team, I have another question about the UI layout. There are some features on Uipress 2 than on Uipress 3, and I want to know if UIpress 3 Lite can do the features from Uipress 2. I have attached some images from Uipress 2 and I am wondering how can I do that on Uipress 3 Lite?

    Admin menu preference panel

    View post on imgur.com

    Toolbar popup settings panel

    View post on imgur.com

    Toggle open and close the admin collapse panel

    View post on imgur.com

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author UiPress

    (@admintwentytwenty)

    Hey,

    The admin menu preferences are not possible – these are all set on a block level now and can’t be changed while using a template.

    For the screen options, this has been moved back to the wp default position. If it is not showing for you then there is an option in the page content block whether it shows or not.

    You could however have a custom button to do this if you like. You would need to add a button block to wherever you want the toggle to be and then mount a javascript function to toggle the button:

    document.getElementById('idofthebuttonblock').addEventListener('click', function () {
      //Get active frame
      let frames = document.getElementsByClassName('uip-page-content-frame');
      //No frame present so abort
      if (!frames[0]) {
        return;
      }
    
      //Get screen options element
      let screenOptions = frames[0].contentWindow.document.getElementById('screen-options-wrap');
      //Screen options panel does not exist
      if (!screenOptions) {
        return;
      }
      
      //Get screen options container
      let screenMeta = frames[0].contentWindow.document.getElementById('screen-meta');
    
      //Check if it is hidden
      if (screenOptions.classList.contains('hidden')) {
        screenOptions.classList.remove('hidden');
        screenOptions.style.display = 'block';
        screenMeta.style.display = 'block';
      } else {
        screenOptions.classList.add('hidden');
        screenOptions.style.display = 'none';
        screenMeta.style.display = 'none';
      }
    });

    Just add the above code to the custom js section of the button block and change the ‘idofthebuttonblock’ to the actual button ID. This is easier with the pro version as there is an option to run JS on click.

    There is no way to toggle admin menu from collapsed to full at the moment, not without some custom code and css anyway.

    Thanks,

    Mark

    Thread Starter scarlywebs

    (@scarlywebs)

    Hey Mark, thanks for getting back to me, that sucks can’t get the admin preference, oh well.

    As for the “Screen Options” where can I find the “page content block” that has the settings? I prefer this then having to put the code in for it.

    And for the “toggle admin menu” is there a CSS code you have for that?

    • This reply was modified 2 years, 3 months ago by scarlywebs.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Uipress Lite Layout Features’ is closed to new replies.