Skip to content
Live
Menu
Theme

Template instructions

A responsive template for your MyFantasyLeague site. It uses Home Page Messages (HPMs) for the header, footer and homepage, so every page stays fast on a phone.

1. Before you start

Save any code you want to keep from your existing Home Page Messages, then delete them. Make sure none of them is already set as a header or footer — that interferes with the install.

Log in as commissioner and open the Commissioner Setup page. On a fresh site the HPMs are numbered: header is #1, footer #2, homepage #3.

2. Skin

On the Select a skin page, choose None.

3. CSS

Go to Images and Other URLs and paste one of these into the CSS URL field.

  • Dark https://v2.mfl.football/assets/css/dist/dark_main.css
  • Dark (DIN headings) https://v2.mfl.football/assets/css/dist/dark_din_main.css
  • Light — blue and green https://v2.mfl.football/assets/css/dist/roboto-blue-green.css

4. Homepage

Paste this into an HPM and label it homepage. It lays out the homepage and loads the script that shows the log-in button — without it, owners can’t log in.

<div class="row">
  <div class="col-md-4 col-md-push-8">
    <div class="utility-nav">
      <div class="utility-nav--button">
        <a href="//%HOST%/%YEAR%/options?L=%LEAGUEID%&O=133">
          <svg class="icon-exchange" aria-hidden="true" focusable="false"><use xlink:href="#icon-exchange"></use></svg>
          <div class="svg-text">Trade Block</div>
        </a>
      </div>
      <div class="utility-nav--button">
        <a href="//%HOST%/%YEAR%/options?L=%LEAGUEID%&O=09">
          <svg class="icon-file-text" aria-hidden="true" focusable="false"><use xlink:href="#icon-file-text"></use></svg>
          <div class="svg-text">Rules</div>
        </a>
      </div>
      <div id="loginlink" class="utility-nav--button loginbutton">
        <svg class="icon-sign-in" aria-hidden="true" focusable="false"><use xlink:href="#icon-sign-in"></use></svg>
        <div class="svg-text"></div>
      </div>
    </div>
    <module name="TRADES" />
    <module name="LEAGUE_CHAT" COUNT="20" />
    <div class="hidden-xs hidden-sm">
      <module name="OWNER_ACTIVITY" />
      <module name="MY_NEWS" COUNT="10" />
      <module name="NEXT_WEEKS_FANTASY_SCHEDULE" />
    </div>
  </div>
  <div class="col-md-8 col-md-pull-4">
    <div class="mobile-standings-wrapper hidden-xs">
      <module name="STANDINGS" UNIT="DIVISION00" />
      <module name="STANDINGS" UNIT="DIVISION01" />
    </div>
    <div class="visible-xs visible-sm">
      <module name="BRIEF_STANDINGS" />
    </div>
    <module name="MESSAGE_BOARD_SUMMARY" COUNT="10" />
    <module name="POWER_RANK" DISPLAY="LEAGUE" />
    <div class="hidden-calendar">
      <module name="MONTHLY_CALENDAR" />
    </div>
    <div class="visible-xs visible-sm">
      <module name="MY_NEWS" COUNT="10" />
    </div>
    <module name="TOP_PERFORMERS" />
    <div class="visible-xs visible-sm">
      <module name="NEXT_WEEKS_FANTASY_SCHEDULE" />
      <module name="OWNER_ACTIVITY" />
    </div>
  </div>
</div>
<script src="https://mfl.football/assets/js/homepage.js"></script>

7. Tabs and modules

On the Homepage Modules and Tabs setup page, remove every module and tab. Only the main tab remains.

On that same page, add one column at 100% and place the homepage HPM in it. Don’t add other modules there — add them inside the homepage HPM instead, with a line like <module name="LEAGUE_CHAT" />.

8. Icons

To swap a nav icon, change the name in xlink:href="#icon-…" (and the matching class) to any of these.