Jump to content

AdminTemplateColumns


Pete
 Share

Recommended Posts

Hi folks

This isn't a new concept, but since I use this on several sites and was getting frustrated by having to add the fields and put the CSS in the admin template's CSS file to have it overwritten on updates I thought I'd make it into a module where it should work regardless of which admin template you use and shouldn't be affected by updates since the CSS to hide the fieldset's container styles is now in a separate CSS file completely.

Unfortunately I can't find the original topic where this concept was introduced (if anyone can find it, please link to it as I can't take credit for the idea), but essentially what the module does is create a left and right columns that are actually fieldsets, and you simply add the fieldsets to your template and place fields in each of the columns to suit yourself.

Enough chit-chat, the screenshot below will explain it better:

post-1-0-17868500-1378407117_thumb.png

I think when this was originally discussed it was back before ryan had introduced field widths, but I think this still has a place for where you have differing heights of field (as per the ASMSelect field on the right of the shot) where using field widths would result in a space before the next row of fields. In fact, this works especially well on pages where you have small bits of information to enter and want to leave a larger left column for text editor, image and file fields.

The beauty of now having variable width columns per-template now as well is that you can change the fieldsets from their set widths of 70% and 30% respectively to whatever suits your needs on a particular template.

Download from the modules directory.

Usage

  1. Download and install the module above
  2. Add admin_column_left and admin_column_right fieldsets to your template and put the fields in the relevant column fieldsets
  3. (Optional) change the field width for either column, taking care to leave 1% for a gap between the two columns (default is left column at 70%, right column at 29%)

That's it!

  • Like 16
Link to comment
Share on other sites

Martijn - no, it wasn't that one, it was renobird's idea that thistimj linked to above - I like renobird's solution as it should work with any admin theme now it's a module :)

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...

EDIT:

SOLVED: http://processwire.com/talk/topic/4562-module-spex-an-asset-and-template-management-module/#entry46402

I have found a solution with the Spex module, sorry for bothering here!

--------------------------------------------------------------------------------------------------------------------------------------------------------

@Pete: thanks for the two columns in Admin! :lol:  It's really helpfull.
 
But also I run into a little issue with the css filename you use. It is appended a ?v=100 to it, and that seems to crash the Minify module. Haven't investigated further because I use Spex together with Minify and all is new to me.
 
But I'm also wondering why the css of the admin backend is loaded in a front end page? Is this because I'm logged in and all styles & js of the modules get loaded automatically?

complete URL to call Minify is: /site/modules/Minify/min/?f=/site/modules/AdminTemplateColumns/AdminTemplateColumns.css?v=100,/site/template/styles/main.css

I don't know where the process should be tweaked (admintemplatemodules, minify, spex, pw-styles-loader) but as you have done this one and the Minify module I've thought here is a good place to ask. :lol:

Edited by horst
Link to comment
Share on other sites

Pete, I've really been enjoying this module. For the new admin theme, I had to make a small adjustment (margin-left: 0) to the last part in the CSS: 

#Inputfield_admin_column_left > div, #Inputfield_admin_column_right > div {
        background: none;
        border: none;
        padding: 0;
        margin-left: 0; /* ryan added this */
}

That change doesn't appear to cause any issues with the old admin theme either. 

  • Like 3
Link to comment
Share on other sites

  • 4 months later...
  • 9 months later...
  • 3 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...