How I can use layout in my page?

Discussion in 'Integration' started by mironovs, Jan 3, 2013.

  1. mironovs

    mironovs New Member

    Joined:
    Jan 3, 2013
    Messages:
    17
    Hello.

    How can I make a page in the protected area using a custom theme layout of aMember? It is necessary to use the header, footer and member menu on my page

    Thank you.
  2. mironovs

    mironovs New Member

    Joined:
    Jan 3, 2013
    Messages:
    17
    Protected area - I mean the protected folder.
  3. mironovs

    mironovs New Member

    Joined:
    Jan 3, 2013
    Messages:
    17
    I found a topic that discusses my problem.

    http://www.amember.com/forum/threads/apply-template-to-custom-php-application.15683/

    But I did not understand where I can place this php file.

    Code:
    /test    <- protected folder
    /amember  <- amember root
    If I place the file in the /test/index.php, I get the error

    What am I doing wrong?
  4. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,274
    Add this line to /amember/application/configs/config.php :
    define('APPLICATION_ENV', 'debug');

    Then copy & past exact error message which you get on your page.
  5. mironovs

    mironovs New Member

    Joined:
    Jan 3, 2013
    Messages:
    17
    Code:
    exception 'Zend_Controller_Router_Exception' with message 'Route default is not defined' in /var/www/amember/library/Zend/Controller/Router/Rewrite.php:318
    Stack trace:
    #0 /var/www/amember/library/Zend/Navigation/Page/Mvc.php(154): Zend_Controller_Router_Rewrite->getRoute('default')
    #1 /var/www/amember/library/Zend/View/Helper/Navigation/HelperAbstract.php(573): Zend_Navigation_Page_Mvc->isActive(false)
    #2 /var/www/amember/library/Am/View/Helper/Menu.php(109): Zend_View_Helper_Navigation_HelperAbstract->findActive(Object(Am_Navigation_User), 0, 1)
    #3 /var/www/amember/library/Zend/View/Helper/Navigation/Menu.php(506): Am_View_Helper_Menu->_renderMenu(Object(Am_Navigation_User), '', '', 0, 1, false)
    #4 /var/www/amember/application/default/themes/mytheme/member/_menu.phtml(20): Zend_View_Helper_Navigation_Menu->renderMenu(Object(Am_Navigation_User), Array)
    #5 /var/www/amember/application/default/themes/mytheme/_top.phtml(11): include('/var/www/amembe...')
    #6 /var/www/amember/application/default/themes/mytheme/layout.phtml(2): include('/var/www/amembe...')
    #7 /var/www/amember/library/Am/View.php(363): include('/var/www/amembe...')
    #8 /var/www/amember/library/Zend/View/Abstract.php(888): Am_View->_run('/var/www/amembe...')
    #9 /var/www/amember/library/Am/View.php(345): Zend_View_Abstract->render('layout.phtml')
    #10 /var/www/test/index.php(6): Am_View->display('layout.phtml')
    #11 {main}:Route default is not defined
  6. mironovs

    mironovs New Member

    Joined:
    Jan 3, 2013
    Messages:
    17
  7. mironovs

    mironovs New Member

    Joined:
    Jan 3, 2013
    Messages:
    17
    Thanks. I already resolved.
  8. rickydeez

    rickydeez aMember Pro Customer

    Joined:
    Aug 3, 2007
    Messages:
    19
    So how was this resolved?

    I'm getting same error: 'Route default is not defined'
  9. thehpmc

    thehpmc Member

    Joined:
    Aug 24, 2006
    Messages:
    901
    Would be nice when people ask others for help and end up resolving the problem that they say how it was resolved rather than 'Thanks. I already resolved'.

    Idea of the forum is a two way thing really ask for help but also give the solutions to possibly help others - simple really.
  10. mironovs

    mironovs New Member

    Joined:
    Jan 3, 2013
    Messages:
    17
    Unfortunately the developers have not been able to help me and I had to write a separate module for this task. Actually, I'm surprised that such a simple task no response from the developer.

Share This Page