Different Layouts for Homepage and Member areas

Discussion in 'Templates customization' started by rickydeez, Feb 27, 2013.

  1. rickydeez

    rickydeez aMember Pro Customer

    Joined:
    Aug 3, 2007
    Messages:
    19
    How would I go about creating two different layouts (layout.phtml)?

    I need 1 for the homepage and the other for logged in Members.

    Also, is it possible to add content pages that aren't protected?
  2. rickydeez

    rickydeez aMember Pro Customer

    Joined:
    Aug 3, 2007
    Messages:
    19
    I guess the easiest thing to do is just to change:

    PHP:
    $this->setLayout('layout.phtml');
    On index.phtml - correct?
  3. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,274
    Yes correct.
    In regards to pages, there is no way to add pages which are not protected from aMember CP .
  4. gswaim

    gswaim CGI-Central Partner

    Joined:
    Jul 2, 2003
    Messages:
    641
    The easiest way to add this level of functionality is to integrate aMember with content management system (CMS). WordPress is one of the more popular solutions.
  5. rickydeez

    rickydeez aMember Pro Customer

    Joined:
    Aug 3, 2007
    Messages:
    19
    Can you use the WP theme for some pages (homepage, content, etc) and use a different aMember theme for member pages?
  6. rickydeez

    rickydeez aMember Pro Customer

    Joined:
    Aug 3, 2007
    Messages:
    19
    I think I got it working how I need it to.

    I created index.phtml in the /protect/wordpress/{my theme}/ dir and put the contents of layout.phtml into index.phtml. I them deleted layout.phtml in the dir so that it would use the one in the aMember theme.

    Let me know if you see any problems doing it this way.
  7. rickydeez

    rickydeez aMember Pro Customer

    Joined:
    Aug 3, 2007
    Messages:
    19
    Well it seems to only make these changes when I do them to the /wordpress/default/ directory.

    I tried to do the same thing to my /wordpress/theme/ dir and it didn't work.
  8. gswaim

    gswaim CGI-Central Partner

    Joined:
    Jul 2, 2003
    Messages:
    641
    Could you explain exactly what you are trying to do? How do you want the member and non-member pagers to be different? With aMember/WordPress you can use the aMember text widget to display different information in widget areas based on subscriptions.

    I just don't understand what you are trying to accomplish, but I don't think the way you are going about it is going to work.
  9. rickydeez

    rickydeez aMember Pro Customer

    Joined:
    Aug 3, 2007
    Messages:
    19
    Yeah, you're right.

    I'll rethink my strategy and will probably come up with a different solution.

    Thanks.
  10. gswaim

    gswaim CGI-Central Partner

    Joined:
    Jul 2, 2003
    Messages:
    641
    Again, if you could explain exactly what you are trying to accomplish, maybe we could provide more help. If you are using WordPress and you really want the free are and premium area to have totally different looks, you could install two instances of WordPress and use two different themes.

    Using aMember with two WordPress sites is covered on this page in the documentation.

Share This Page