-
Notifications
You must be signed in to change notification settings - Fork 9
Sharing Content Between Pages
This assumes that you have a folder of pages for partners and a folder of pages for industries and you would like to list partners related to each industry on each industry page
http://domain.com/industries/electronics.html http://domain.com/partners/homer_simpson.html
-
Create custom fields for Pages with the following tags:
<$mt:PageDataPartnerEmail$> <$mt:PageDataPartnerLocation$> <$mt:PageDataPartnerHeadshot$>
I’m assuming that you’ll use the Page title for the Partners full title: “Dr. Homer Simpson, Esq the 3rd”
-
Add this to your Page archive template:
<mt:setvarblock name="industry_basename_tag">@<$mt:EntryBasename$></mt:setvarblock> <$mt:include module="Partners Module" industry_basename_tag="$industry_basename_tag"$>
-
Create a new module named “Partners Module” and paste this content in:
<mt:Pages tag="$industry_basename_tag"> <mt:PagesHeader> <div class="partners"> <div class="partnerID"> <h3>Partners</h3> </mt:pagesheader> <div class="partner"> <p class="name"><a href="mailto:<$mt:PageDataEmail$>"><$mt:PageTitle$></a></p> <p class="location"><$mt:PageDataLocation$></p> <a href="<$mt:PagePermalink$>"><mt:PageDataPartnerHeadshotAsset><img width="87" height="116" alt="<$mt:PageTitle$>" src="<$mt:AssetURL$>"/></mt:pagedatapartnerheadshotasset></a> <p class="meta"><a href="mailto:<$mt:PageDataEmail$>">E-mail</a> ・ <a href="<$mt:PagePermalink$>">Biography</a></p> </div> <mt:PagesFooter> </div> </div> </mt:pagesfooter> </mt:pages>
Now add the tag corresponding to the industry each Partner should be displayed with. ie. if Dr. Homer Simpsom, Esq the 3rd is should be associated with the “Electronics” and “Chemical” industry pages, then add the tags “@electronics” and “@chemical”…. assuming these (minus the “@”) are the basenames of the industry pages.
Save the Partner page
- Rebuild the Industry page