Where can I find the helpdesk index template?

Discussion in 'aMember Pro v.4' started by deusdies, Apr 27, 2012.

Thread Status:
Not open for further replies.
  1. deusdies

    deusdies New Member

    Joined:
    Oct 17, 2010
    Messages:
    11
    So I've found all the other templates (ticket.phtml, etc. and all the css files), but I can't find the main helpdesk index template. I did find the index.phtml but that one only has:

    PHP:
    <?php
    $this
    ->layoutNoTitle true;
    if (
    $this->switchLayout) { $this->setLayout($this->switchLayout); }
    echo @
    $content;
    ?>
    I thought the $content variable had something to do with it, alas I was wrong: removing this code rendered viewing the individual tickets useless, but the helpdesk index page was still there.

    Help?
  2. miso

    miso aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    542
    I am wondering the same thing - this doesn't seem to be as obvious to find... anyone? Alex?

    I've tried editing /members/application/helpdesk/views/helpdesk/index.phtml, no luck, the Helpdesk tab in Members Area shows no changes.

    I've tried taking that template/folder and sticking it into the custom theme folder, still nothing.

    How do we customize this section/tab's templates?
  3. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,435
    Looking for this too! Just browsed all the helpdesk files and cant figure out how to edit the main helpdesk page. How can we add a block to it? Is there a block section?

    David
  4. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    1,682
    There is not template to display table of tickets. Helpdesk module use standard Grid component to output it.
    All layout setup done in Grid class without template. You can add any message in helpdesk index page above table with ticket with option 'Intro Text on Helpdesk Page' on Helpdesk module page configuration.

    Also you can use Am_Event::AFTER_RENDER hook to alter layout of this page.
    Here is example of code to do it:
    PHP:
    Am_Di::getInstance()->hook->add(Am_Event::AFTER_RENDER'addTextAbove');
     
    function 
    addTextAbove(Am_Event_AfterRender $event)
    {
        if (
    preg_match('#^/amember/helpdesk/index.*#i'$_SERVER['REQUEST_URI']))
        {
            
    $event->replace('#(<h1>Tickets.*</h1>)#i''$1<div>Some content here</div>');
        }
    }
    You can put this code to file site.php
  5. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,435
    OK, that worked, how do I replace the text in the 'New' button with something else? I tried the language file.

    David
  6. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    1,682
    You can add additional replacement to function addTextAbove in code example above.
    PHP:
    $event->replace('#(<a.*?class="button".*?>)New(</a>)#im''$1Open Ticket$2');
Thread Status:
Not open for further replies.

Share This Page