Skip to content

Instantly share code, notes, and snippets.

@antonioortegajr
Last active January 12, 2018 02:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antonioortegajr/26193f18b75cfbdef6446e250d0703fe to your computer and use it in GitHub Desktop.
Save antonioortegajr/26193f18b75cfbdef6446e250d0703fe to your computer and use it in GitHub Desktop.
details page twig

details page twig variable definitions.

Some variables and macros will riqure the an import. These are generally indentified when a period is included Example: labels.subdivision Additionally some variable are combined with logic such as an {% if %} statement. Others may pass arguments.

{% import "detailsTools-1.002.twig" as tools %} - imports other macros as tools

{# note #} - add a note to file. Nothing renders on front end

{% block idxContent %} - Declares and names a block in twig

{% spaceless %} - Removes white space between divs

{% if middleware %} - condition to exicute only if the page is being opened in the IDX middleware

{% include 'singleMlsDisclaimers-1.000.twig' %} - add disclaimers macro to the template

{{ detailsBaseURL }} - base url for this details page

{{ nav.prev.detailsURL } - url to previous details page

{{ nav.next.detailsURL } - url to next details page

{{ nav.prev }} - previous page exists, returns true or false

{{ nav.next }} - next page exists, returns true or false

{{ mlsRules.remarksPrefixText }} - text required by the MLS

{{ listingID }} - property listings ID

{{ idxID }} - idx mls ID

{{ nav.newSearch }} - url for new search in the nav

{{ nav.modifySearch }} - link to modify a search if preformed previously

{{ nav.backToResults }} - link back to a results page if exists

{{ address }} - property address

{{ cityName }} - city the property is in

{{ state }} - state the property is in

{{ newSearchURL }} - link for a new search

{{ mediaData.vtCount }} - number of media links for virtual tours

{{ mediaData.vt.0.url }} - first media url for virtual tours

{{ featuredAgentInfo }} - macro retuning data on the featured agent

{{ featuredAgentInfo.userID }} featured agent ID

{{ moreInfoLink }} - url string for IDX more info page

{{ scheduleShowingLink }} - url string to schedule a showing

{{ mortgageLink }} - url string to IDX mortgage calc page

{{ customLink.url }} - url string to custom link

{{ imageData.1.url }} - url string to primary property image

{{ vimageData.totalCount }} - property image total

{{ propertyLink }} - url string to current property page

{{ streetNumber }} - street number of the property

{{ streetDirection }} cardinal direction of the property

{{ streetName }} name of the street the property is on

{{ cityName }} name of the city the property is in

{{ state }} name of the state the property is in

{{ stateAbrv }} - abbriviation of the state the property is in

{{ zipcode }} - zip code the property is in

{{ rntLsePrice }} rental or lease price of the property

{{ mediaData.ohCount }} total number of open houses for the property

{{ mediaData.oh }} - open house data for the property

{{ oh.text }} - open house text for the property

{{ oh.descriptor }} - discription of the open house for the property

{{ oh.ohLink }} - url sting for the open house

{{ oh.hostedBy }} - host of the open house

{{ moreInfoLink }} - link to more info page

{{ mortgageListingPrice }} - price from mortgage calc

{{ mortgageDownPayment }} - estimated down payment of mortgage

{{ mortgageLoadAmounts }} - estemated load of mortgage

{{ clientRules.detailsMapType }} - display map based on middleware rules

{{ latitude }} - property latitude

{{ longitude }} - property longitude

{{ clientRules.displayWalkscoreWidget }} - return rule value if walkscore should be displayed

{{ tools.walkscore }} - display walkscore

{{ tools.map }} - display map

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment