Adding A Header

Discussion in 'Templates customization' started by kenmomentum, Nov 19, 2013.

  1. kenmomentum

    kenmomentum New Member

    Joined:
    Apr 1, 2011
    Messages:
    26
    Hello Great Forum

    I am new to Version 4.3.5 coming from version 3x

    How do I go about adding a simple header like amember has on the following page
    https://www.amember.com/support/

    I do not need a menu at this time but I might use one later.

    Thanks for your help with this
  2. thehpmc

    thehpmc Member

    Joined:
    Aug 24, 2006
    Messages:
    901
  3. kenmomentum

    kenmomentum New Member

    Joined:
    Apr 1, 2011
    Messages:
    26
    Hello

    Using the link above I created the example that is shown in the link:
    As you know there is no header or footer in the example.

    Do I add the header if I add the following line in the example then it shows up?
    <?php echo $this - >_scriptImg('large-alert.png'); ?>

    I know I am ignorant on how this works but the problem is I am not clear what is going on in this page.

    The other thin on this page is where is all the css coming from to get the proper look on the site.
  4. thehpmc

    thehpmc Member

    Joined:
    Aug 24, 2006
    Messages:
    901
    Is this the type of thing you are trying to achieve? If so I'll guide you through it.

    http://www.themanualslibrary.co.uk/membership/signup/index

    There is currently a couple of display errors on the page as the header & footer on main site has changed and I haven't changed the css for this page.
  5. kenmomentum

    kenmomentum New Member

    Joined:
    Apr 1, 2011
    Messages:
    26
    Hello

    Yes, something simple like you have is a great idea. It appears I am not understanding on what is going on in the
    template: http://www.amember.com/docs/Themes_and_Templates

    Something as simple as the default is good also but I am not sure where the default template is or that maybe hard coded.

    This is a very difficult transition from version 3 but it will be worth it.
  6. thehpmc

    thehpmc Member

    Joined:
    Aug 24, 2006
    Messages:
    901
    Bear with me and I will upload the content of my customised theme folder complete with files but before I do I will add a few comments into the html so that you can see what is what.

    Note not claiming it is the best way but I think it was first or second attempt so will be tidied up next few weeks.
  7. thehpmc

    thehpmc Member

    Joined:
    Aug 24, 2006
    Messages:
    901
    Files are attached from memory the important, changed, one is the layout.phml

    I have added a number of relevant comments throughout script so you should see how it works. Hope in the process of adding them I haven't overwritten anything and broken it.

    As it stands this is in current use on live site, example in link above.

    It is saved in folder called tml. Once your theme is uploaded the name of the containing folder will appear in the themes drop down box on global configuration page.

    The same page structure is used throughout my site and items, such as header, footer and navigation, use the same respective 'include' files. This is the reason why in my structure the includes relate back to main site. Advantage of this is that if I change, say, header on main site pages it also changes in the aMember ones.

    Hope this helps.

    Attached Files:

    • tml.zip
      File size:
      5 KB
      Views:
      19
  8. kenmomentum

    kenmomentum New Member

    Joined:
    Apr 1, 2011
    Messages:
    26
    Hello thehpmc

    Thank you for the file. I am going to give that a test run. With your comments I think I can figure this out. This is not an easy transition from v3

    There are many things I liked in 3x that are not avialble in 4x but I have to upgrade due to my server needs to upgrade MySQL and version 3 does not work with the new upgrade.

    Thanks again and I will let you know how things work out.
  9. crystalmedia

    crystalmedia Member

    Joined:
    Oct 15, 2013
    Messages:
    39
    Using a php echo for your header image is not a good solution if you plan on having multiple pages. Why? Because it doesn't cache - meaning it will need to reload on every page a user visits. On mobile phones this is even more noticeable.

    Best and fastest solution for your users is to place some html for the header image/logo instead ! :)

Share This Page