PHP Variables for templating

Viewing 3 posts - 1 through 3 (of 3 total)

These forums are closed to new replies / tickets. Please open a support ticket from our new Support page.

  • Author
    Posts
  • #1744
    Leon Bennetts
    Spectator

    Hello,

    I’m modifying a listing template for a client. However, to match specs, I’m having issues finding out which variables are set for templating purposes. I’ve looked at the meta fields list, but I find that not all variables are actually set.

    E.g.: $property_authority returns nothing, $property_land_area returns nothing; both are setup correctly on the property screen.

    Any assistance is much appreciated.

    Thanks

    #1748
    Merv Barrett
    Keymaster

    Hi Leon,

    Are you loading the listing-meta.php just before your function executes?

    eg

    function my_custom_template() {
    	if ( defined('EPL_PATH_TEMPLATES_CONTENT ') ) {
    		include( EPL_PATH_TEMPLATES_CONTENT . 'listing-meta.php' );
    		include( 'my-custom-template-file.php' );	
    	}
    }

    All the variables are loaded in the listing-meta.php file as to minimise MySQL database calls. That file saves all the variables in the $meta variable using get_post_custom(); once. Then the listing-meta.php file processes all the meta variables.

    Let me know, perhaps zip your template here as a .txt or zip file (Forum does not accept .php files.

    We’ve also just pushed out version 1.2 which addresses the template hook correctly now.

    • This reply was modified 7 years, 2 months ago by Merv Barrett.
    • This reply was modified 7 years, 2 months ago by Merv Barrett.
    #6419
    Merv Barrett
    Keymaster

    This procedure is no longer required in Easy Property Listings 2.0

    The correct procedure for custom templates is explained here.

These forums are closed to new replies / tickets. Please open a support ticket from our new Support page.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘PHP Variables for templating’ is closed to new replies.