0

I'm trying to find an easy way to have basic instructions displayed when the client opens the CP (I'm using NSM Publish Hints for detailed instructions on entry windows).

I was using DashEE, which was great, but since EE2.9, it hasn't been functioning properly so that I can't update anything.

How do you all provide basic on-screen instructions to the client so that when they open the Control Panel it's obvious how they should proceed?

Thanks in advance.

2 Answers 2

1

You could inject JS using this add-on into the area of the Control Panel you want the the help text to appear - then you can expand it to all relevant pages you want help on - not just the CP homepage.

JS...

$(document).ready(function($) {
    $(".contentMenu.create").before('<div class="helpText contentMenu"><p>Help Text goes here</p></div>');
});

Example CSS...

.contentMenu.helpText {
    background-color: honeydew;
    width: auto;
    margin: 0 40px 30px;
    float: none;
    padding: 20px;
}

Result...

Control Panel Grab with Help Panel

Obviously change your JS target for different pages in the Control Panel.

1
  • Lol upvote for honeydew.
    – jrothafer
    Sep 26, 2015 at 16:49
0

If these are static instructions (they generally won't be changing), you could craft an EE Accessory to just insert a new element on the CP Home Page with your instruction in them.

https://ellislab.com/expressionengine/user-guide/development/accessories.html

Here's a pseudo-ish-code example:

function set_sections()
{
    // Check to see if you're on the CP Home Page
    // if not, return false

    // use the ee()->cp->add_to_foot() to add jQuery to insert stuff
    // kinda like this:
    ee()->cp->add_to_foot('
        $(document).ready(function(){
            $("#mainContent").prepend("<div class=\"contentMenu helptext\" style=\"width: 93.6%;margin-bottom: 1em;\"><div class=\"heading\"><h2>Help Text</h2><ul class=\"homeBlocks item\"><li>Help! I need to tell you all the helping things!</li></ul></div></div>");
        });
    ');
}

And tada!

enter image description here

Edit Welp, if it's something you need to change constantly, here is one option. Store a snippet with your instructions, and dump that instead of static stuff. Call your snippet cp_help_text or something. Snippet content:

<div class="contentMenu helptext" style="width: 93.6%;margin-bottom: 1em;">    
    <div class="heading">
        <h2>
            Help Text
        </h2>
        <ul class="homeBlocks item">
            <li>
                Help! I need to tell you all the helping things! Easily changed from the Design -> Template -> Snippets.
            </li>
        </ul>
    </div>
</div>

And back to the accessory:

...
$snippet = ee()->db->select()
                   ->from('snippets')
                   ->where('snippet_name', 'cp_help_text')
                   ->get()->row_array();

ee()->cp->add_to_foot('
    $(document).ready(function(){
        $("#mainContent").prepend("'.$snippet['snippet_contents'].'");
    });
');
....

Yup, seems convoluted! Perhaps someone can give you a better answer.

13
  • Thanks for this -- I'm actually looking for something that would be a bit easier to change (in other words, for not-necessarily static instructions), but I will try this out. I'm curious also how other people are dealing with this issue. What do you all do?
    – edward
    Sep 25, 2015 at 17:55
  • I edited my answer to slightly accommodate your question. Lol I know it's not the greatest answer but it would get it done. Hopefully someone else can chime in.
    – jrothafer
    Sep 25, 2015 at 18:29
  • I decided to give your suggestion a spin; I was hesitant because I don't know anything about php. So I copied the first example of your code directly into a file (acc.cp_help_home.php), but when I try to implement it, I get an error saying "Parse error: syntax error, unexpected ')' in line 23" which is the 3rd to the last line, containing }); -- any idea what the problem would be? I would post the entire code I'm using, but not sure how to do that in a comment; do I need to edit the original post? I greatly appreciate your help with this!
    – edward
    Sep 26, 2015 at 3:25
  • Throw it in a pastebin and I will help you out! pastebin.com
    – jrothafer
    Sep 26, 2015 at 16:11
  • Oh and basically an easier method to my answer is contained in Peter Lewis' answer!
    – jrothafer
    Sep 26, 2015 at 16:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.