Results 1 to 9 of 9

Thread: Two templates for admin area

  1. #1
    Join Date
    Aug 2009
    Posts
    79

    Default Two templates for admin area

    Is there a way to use two templates in the admin area as is possible with the frontend. I want to use the first page of the admin area to display
    summary information for agents. With the help of the forum I have a few addons that show the agents: listing summary, stats for all listings, popular and least popular listings, as well as which listings will expire in the next week. I want to show these addons in admin on the first page agents see when they log in without them needing to click on the individual addon links. I tried placing the addon tags before the content tag in main.html and it works but the problem is that it stays on all of the admin pages instead of just the first. I also tried creating an alternate template naming it page1_main.html and placing all tags except the content tag as I did in the frontend but it doesn't work. Any suggestions on how I can accomplish this?

    Thanks.

  2. #2
    Join Date
    Jul 2003
    Location
    California
    Age
    43
    Posts
    4,229

    Default Re: Two templates for admin area

    There is nothing in Open-Realty to handle multiple admin templates.

    Why not just set your addon to only display if the $_GET action is null. Therefore only displaying on the admin index page.
    Open-Realty 2 Documentation

    ~The Difference Between an ORDEAL and an ADVENTURE is ATTITUDE~

  3. #3
    Join Date
    Aug 2009
    Posts
    79

    Default Re: Two templates for admin area

    Thanks Mick for the response but I'm new at this. Can you be a little more specific.

  4. #4
    Join Date
    Jul 2003
    Location
    California
    Age
    43
    Posts
    4,229

    Default Re: Two templates for admin area

    in your add-on's function that displays your add-on add an if statement to check for the $_GET action value and only display the content if that is null
    Open-Realty 2 Documentation

    ~The Difference Between an ORDEAL and an ADVENTURE is ATTITUDE~

  5. #5
    Join Date
    Aug 2009
    Posts
    79

    Default Re: Two templates for admin area

    ok, so i tried adding the following if statement to the addon but it's still not working.

    PHP Code:
    if ($_Get[action] != null) {
    // Do nothing 
    } else { 
    and 
    then the rest of the code to display the addon
    What I discovered is that "null" doesn't seem to be working. When I replace "null" with an actual action such as "edit_my_listings" so that the if statement reads:

    PHP Code:
    if ($_Get[action] != edit_my_listings) {
    // Do nothing 
    } else { 
    it works properly. The addon only shows on the edit my listing page. Any suggestions on how I can get "null" to work.

    Thanks

  6. #6
    Join Date
    May 2004
    Location
    Long Island, NY
    Age
    49
    Posts
    9,796

    Default Re: Two templates for admin area

    You would use

    if ($_GET['action'] != '')

  7. #7
    Join Date
    Aug 2009
    Posts
    79

    Default Re: Two templates for admin area

    thanks for the response. I tried single quotes and double quotes. Still not working.

    BTW: I sent you a private message and email regarding your paypal addon. When you get a chance can you get back to me.

    Thanks.

  8. #8
    Join Date
    May 2004
    Location
    Long Island, NY
    Age
    49
    Posts
    9,796

    Default Re: Two templates for admin area

    OR sets the action to index of it is null or not set.

    Try:

    if ($_GET['action'] != 'index')

  9. #9
    Join Date
    Aug 2009
    Posts
    79

    Default Re: Two templates for admin area

    It worked. Thanks a lot

Similar Threads

  1. User Admin Area
    By Rik in forum General Help (CLOSED)
    Replies: 1
    Last Post: 01-10-2007, 01:59 PM
  2. Admin Area
    By Rik in forum General Discussion
    Replies: 3
    Last Post: 08-19-2006, 10:13 AM
  3. Locked Out of Admin Area
    By sisterpete in forum Installation/Configuration Help (CLOSED)
    Replies: 4
    Last Post: 03-21-2006, 12:04 PM
  4. admin area
    By dantanner in forum General Discussion
    Replies: 2
    Last Post: 02-09-2006, 08:22 PM
  5. Admin Area Not Accesible
    By hsg in forum Installation/Configuration Help (CLOSED)
    Replies: 3
    Last Post: 02-09-2006, 06:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •