× This is the optional category header for the Suggestion Box.

J&WP Property Widget - New feature in Nightly

  • Vince Waoll
  • Topic Author
  • Visitor
  • Visitor
1 year 5 months ago #4 by Vince Waoll
WordPress & Joomla

There's new functionality available in the Nightly branch that I feel is worth mentioning.

Recently (after 10.5.5 was released) in the Basic Module Output template file I added new code that allows us to show the Room Features (for MRPs) and Property Features in the template file handled by the Basic Module Output template.

github.com/WoollyinWalesIT/jomres/blob/n...dule_output.html#L43

Now, by default that information isn't visible. That's because I don't want a default installation of Jomres' output to be cluttered up, so how do you use this?

Let me show you, by example.

Today I added a new script to Core called Property Widget.

github.com/WoollyinWalesIT/jomres/commit...5dfb4fdf51dd861cf76e

This script is intended to be called as a shortcode, such as [jomres property_widget &property_uid=1] (WordPress) or {jomres property_widget &property_uid=1} (Joomla)

Now, this can be used as is to show the property module output somewhere on your Joomla or WordPress site however it has a useful little feature.

By copying the basic_module_output.html file to the overrides directory (see the  www.jomres.net/documents/English_Jomres_...Developers_Guide.pdf  Basic Template Overrides) I'm now able to display the output in a customised version of basic_module_output.html


I want to show those property features, so what I did next was I copied basic_module_output.html file into the override directory and called it basic_module_output_verbose.html

Now I can change the shortcode to this :

[jomres property_widget &property_uid=1&alt_template_name=basic_module_output_verbose]

and uncomment the patTemplate rows so that they look like this :
<patTemplate:tmpl name="room_features" type="simpleCondition" requiredVars="abbv">
<span style="font-size: 0.7em;">{ABBV}/</span>
</patTemplate:tmpl>

<patTemplate:tmpl name="property_features_names" type="simpleCondition" requiredVars="abbv">
<a href="{SEARCH_URL}" style="font-size: 0.7em;">{ABBV}/</a>
</patTemplate:tmpl>

And it outputs this


wherever that shortcode is placed.

So, in some areas I can show just the normal basic_module_output.html content as normal, and in other areas I can choose to display more verbose information.
 
Attachments:

Please Log in to join the conversation.

© 2021 JomresPlugins.com. All Rights Reserved.

Please publish modules in offcanvas position.