What's the difference between {jomres and {jomres_script ...?

More
2 months 6 days ago #47962 by Vince Wooll
Note: the { and [ braces can both be used in Joomla. In WordPress you'd use [. If you're a WP user, just transpose { for [ in the rest of this post.

TLDR;

{jomres... is for CMS content, such as within WordPress articles or Joomla modules or articles, whereas {jomres_script... is for Jomres own content, typically Jomres template files.

Content plugins

Jomres has two plugins that will parse content generated by the CMS.

In Joomla that's "Jomres ASAModule Mambot", and in WordPress it's "Jomres Shortcodes".

These two plugins are custom for Joomla or WordPress but they behave in fundamentally the same way. They'll look for {jomres blahblah} shortcodes in CMS content and if they see it, they'll send the contents of the shortcode to Jomres to parse and produce output, which the plugins will then hand back to the CMS to display.

After a while of using these shortcodes I realised that I could do something similar in Jomres template files, meaning that I could just write a similar shortcode into a Jomres template file and Jomres would call itself and produce the same output, just as if it had been called by "Jomres asamodule mambot" or "Jomres Shortcodes". This saves a ton of work and simplifies things when you want to mix'n'match layout.


Setting the property uid

Determining how to set the property is a little complicated, and it's talked about in this document , under "Including script content from one page in another Jomres template file" however all you need to know is, if you're adding the shortcode to the property_details.html template use

PROPERTY_UID=N

and in every other Jomres template file, if the Property uid has already been determined by a calling script (e.g. the show property header script) use

&property_uid={PROPERTY_UID}


If you're using the shortcode in an article or module then you'll need to know beforehand what the property uid is and add that to the shortcode.



So, a shortcode in property_header.html looks like

{jomres_script show_property_slideshow &property_uid={PROPERTY_UID}&image_size=large&slideshow.html=slideshow_baguettebox.html}

whereas in property_details.html it looks like

{jomres_script show_property_slideshow PROPERTY_UID=N&image_size=large&slideshow.html=slideshow_baguettebox.html}

and in a CMS's article it would look something like

{jomres show_property_slideshow &property_uid=10&image_size=large&slideshow.html=slideshow_baguettebox.html} 

 

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