J&WP Property Widget - New feature in Nightly

More
3 months 2 weeks ago - 3 months 2 weeks ago #47933 by Vince Wooll
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

File Attachment:


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.
Last edit: 3 months 2 weeks ago by Vince Wooll.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum

ABOUT US

vince picDeveloped and maintained by Vince Wooll, Jomres was initially conceived in early 2005 as a Mambo based solution to a client’s hotel management needs. While it wasn't originally expected to be an online booking system it quickly morphed into one as users requested more and more features.

As the number of feature requests grew Vince knew that he would need to dedicate more time to the project and in July 2005 Jomres was released as a commercial project. Since then Jomres has become the world's oldest online booking plugin for any PHP CMS. It has been used in Joomla 1.0, 1.5, 2.5, 3 & 4 and WordPress 4, 5 & 6.

Aladar joined the project in 2010 after using Jomres for his own projects. He was active on the forum, helping other members of the community and eventually Vince invited him to join the team. Between 2010 and 2018 he was an integral part of the project and made many significant contributions.

Whilst not formally part of the Jomres project, Rodrigo Rocco and Vince have become firm friends. Rod is a freelancer who specialises in doing custom work for Jomres users and developing custom plugins for the system that take advantage of it's modular design. He has built many useful extensions including his fabulous Valentina Template Override Package.

Jomres and the Jomres Logo is trademarked and can't be used without written consent from the owner.

www.jomres.net is not affiliated with or endorsed by the Joomla! Project, Open Source Matters or the WordPress project. The Joomla! & WordPress names and logos are used under a limited license granted by Open Source Matters and the WordPress Projects.

© Copyright 2005 - 2022 Vince Wooll