Pulling miva info (Global Header / Footer) into a static page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rob.lillis
    Mivite Lite

    • Sep 2010
    • 1

    #1

    Pulling miva info (Global Header / Footer) into a static page

    Is there a way to pull over the global header into a static html page?

    SO that way if you update the global header or another global element in the miva admin it would update any page in or out of miva with the new information.


    Thank you,

    Robert
  • Bruce - PhosphorMedia
    Developer Partner











    • Mar 2006
    • 11256

    #2
    Re: Pulling miva info (Global Header / Footer) into a static page

    Yes, using an iframe on the static page, then calling newly created page in merchant. For example,

    Create a page called HEAD, add to that page any SMT/HTML and Items needed to generate the "header" of your site. Then, in the static page (or, dynamic for that matter--as we use this for integrating blogs and other web applications), use:

    Code:
    <iframe src="http://domain.com/mm5/merchant.mvc?Screen=HEAD"></iframe>
    Then do something similar for the footer.
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
    phosphormedia.com

    Comment

    • Mike521w
      Mighty Mivite


      • Aug 2007
      • 610

      #3
      Re: Pulling miva info (Global Header / Footer) into a static page

      hi Bruce, I have the same idea as the original poster here. Is there a way to connect directly to the DB and pull the HTML rather than using an iframe? I'm digging around in the DB but I can't find the right table yet, do you know?
      Looking for work as of March 2024! I've been a web developer for going on 20 years, with most of that time spent on Miva sites.

      Comment

      • Mike521w
        Mighty Mivite


        • Aug 2007
        • 610

        #4
        Re: Pulling miva info (Global Header / Footer) into a static page

        I believe I got it. For anyone who reads this in the future, you have to do something along the lines of this:

        1. get the template ID of whatever you're getting
        -- template ID's are stored in their own tables, for example the html doctype id is in s01_CSSUI_HTML, field is templ_id

        2. get the ID of the current active version of this template from s01_ManagedTemplates
        -- for example "select current_id from s01_ManagedTemplates where id = 'IDFromStep1'

        3. get the source from s01_ManagedTemplateVersions based on the current_id
        -- for example select source from s01_ManagedTemplateVersions where id = 'CurrentIDFromStep2' and templateID = 'IDFromStep1'

        The last check of templateID = 'IDFromStep1' is probably not necessary
        Looking for work as of March 2024! I've been a web developer for going on 20 years, with most of that time spent on Miva sites.

        Comment

        Working...
        X