tips icon image

EE Insider Tips
Sponsored by Mijingo's EE 2 Screencasts

ExpressionEngine mini-howtos created by the EE Insider community.

Tweaking the CP for productivity

User's avatar
  • Posted by Jim Wyse
  • July 24, 2009
  • 5 people have found this tip helpful.

Have you ever been enjoying your favorite beverage at a fine establishment while working on your laptop, only to grimace every time you have to scroll down the screen to get to the Update button for a template.
Solution: Make a copy of the buttons on top of the page.
In the file: /system/cp/cp.templates.php
At Line 3139 add the code between the comments.

.$DSP->input_hidden('template_id'$template_id);  /// Line 3139 
////// copy of buttons to top of page
$r .= $DSP->div('templatebox');
$r .= $DSP->qdiv('itemWrapper'$DSP->input_submit($LANG->line('update')).NBS.$DSP->input_submit($LANG->line('update_and_return'),'return'));
$r .=  $DSP->div_c();
/////// end copy of buttons 

You will now have update buttons at the top of the form and won’t have to scroll down to update templates on wide aspect ratio or small screens.

I’m sure this approach can be applied in many other places.
Looking forward to trying this with the new view files in v1.6.8

ExpressionEngine 1.6.7 Build:  20090211

Batdelfuego17:28 on 07.24.2009

And how frustrating is it when working on the laptop, trying to scroll with your track pad and the textarea content scroll instead of the page… then you have to move away form the text area!

Wow! How lazy is that?! wink

That’s a nice tip tho… already modified the code on one of the site I’m working for and it works perfectly!

thanks!

Sean Smith13:00 on 07.26.2009

could this be made into an extension? would rather do that than hack the core files.

Jim Wyse15:22 on 07.26.2009

I have no doubt that it could be done. Time I don’t have right now. I agree that hacking a core file is probably not the ultimate long term way to go.  As busy as I am right now, it was a 5 min fix and I use it constantly. Learning how to write extensions is on the to do list.

Jim

JimInHolland21:12 on 07.27.2009

As a point, 1.6.8 is a no-go. The function seems to get called at 3138 but it also didn’t work, but as I’m in the office now it’s not the time to play.  wink  I’ll give it a shot later.

Jim Wyse08:50 on 07.28.2009

I just did an update to 1.6.8 on a site and applied the hack.
Seems to work fine. Same code.

One note: in v1.6.8 line 3139 would be line 3138.

Jim

tim deSilva22:24 on 10.30.2009

Love this tip - Thanks for the heads up!

PS - For me it was line 3144.

Natalie16:23 on 02.17.2010

Thank you so much! Line 3143 for me.

Add Your Comment?

You must have an EE Insider account to post comments on Insider Tips. It's fast, easy and hassle-free.

Sign up now (or login).

Search EE Insider Tips
Sponsored By