Need to output the location name on —> view-register layout-default with no link

  • Patrick Toulze
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 6 months ago - 3 years 6 months ago #144678 by Patrick Toulze
I need to output the location name on —> body class —>  view-register layout-default with no lightbox link

I know where to override but my php call output nothing.

I base my php override by copying EB code snippets and sometime modify it to my ability — I’m not a coder


This is what I have so far;
Override in —> Template > html > com_eventbooking > register > default.php


Note: I keep the lightbox link in this code...
PHP
Code:
<?php /*?>GRAF put Location Top Registration Form<?php */?>  <div class="register-location-container">       <div class="left-div-text"> <strong> <?php echo JText::_('EB_LOCATION'); ?> :</strong></div>      <div class="right-div-location">      <?php                             if ($event->location_address)                             {                             ?>                                 <a href="<?php echo JRoute::_('index.php?option=com_eventbooking&view=map&location_id='.$event->location_id.'&tmpl=component'); ?>" class="eb-colorbox-map"><span><?php echo $event->location_name ; ?></span></a>                             <?php                             }                             else                             {                                 echo $event->location_name;                             }                             ?>         </div>      </div> <?php /*?>END GRAF put Location Top Registration Form<?php */?>


The language string work (JText Location) but nothing output for the location name ?

Thanks in advance for your help!
Last edit: 3 years 6 months ago by Patrick Toulze.

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

More
3 years 6 months ago #144688 by Tuan Pham Ngoc
In that file, the simplest way to display location name would be using this code:
Code:
if (!empty($replaces['location_name'])) {     echo $replaces['location_name']; }
The following user(s) said Thank You: Patrick Toulze

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

  • Patrick Toulze
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 6 months ago #144707 by Patrick Toulze
Thank You! Work perfectly!
 

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

More
3 years 6 months ago #144730 by Tuan Pham Ngoc
Please remember to move the modified code to PATH_TO_TEMPLATE/html/com_eventbooking/event folder so that the change won't be lost when you update to future releases of the extension.
The following user(s) said Thank You: Patrick Toulze

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

  • Patrick Toulze
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 6 months ago #144754 by Patrick Toulze
Yes, Thank You!
Override in —> Template > html > com_eventbooking > register > default.php

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

More
3 years 6 months ago #144762 by Tuan Pham Ngoc

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