Column Layout: Details Button

  • Siterelish LRM
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 2 months ago #93390 by Siterelish LRM
Column Layout: Details Button was created by Siterelish LRM
I know this may be a long shot, but does anyone have the code I need to add to the upcoming events column layout template so that I can add the details button to the page?

I did attempt to pull the code from the events-default.php template but ended up with a white page with just the words "Upcoming Events" on it as I have very little PHP experience. So if someone could give me the code and tell me exactly at what lines it needs to be inserted, I would be most grateful.

Thanks!

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

More
9 years 2 months ago - 9 years 2 months ago #93395 by James Riley
Replied by James Riley on topic Column Layout: Details Button
Congratulations -- you found a bug :woohoo:

The code for the details button *is* in the file, but it is being skipped due to a misplaced "ELSE" statement that is only running the details button code if $isMultipleDate is true. @Tuan -- please fix :)

Here is what you can do right now in order to get it working.
Search /components/com_eventbooking/view/common/tmpl/event_columns.php for
Code:
<a class="<?php echo $btnClass; ?> btn-primary" href="<?php echo $detailUrl; ?>">

Just before and after that line of code, you'll see an "else" statement and the corresponding { } brackets that form the codeblock. Place a double-slash "//" in front of the 3 lines indicated to comment the lines out.
Code:
//else <----- HERE //{ <----- HERE ?> <li> <a class="<?php echo $btnClass; ?> btn-primary" href="<?php echo $detailUrl; ?>"> <?php echo $isMultipleDate ? JText::_('EB_CHOOSE_DATE_LOCATION') : JText::_('EB_DETAILS');?> </a> </li> <?php //} <----- and HERE

James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.
Last edit: 9 years 2 months ago by James Riley.

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

  • Siterelish LRM
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 2 months ago - 9 years 2 months ago #93399 by Siterelish LRM
Replied by Siterelish LRM on topic Column Layout: Details Button
Thank you! Thank you! Thank you James!

UPDATE: Worked like a charm; thank you again James!!!

I will give your instructions a try; wish me luck :)
Last edit: 9 years 2 months ago by Siterelish LRM.

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

More
9 years 2 months ago #93402 by James Riley
Replied by James Riley on topic Column Layout: Details Button
Your welcome :)

@Tuan -- The else block should be unnecessary as there is code to handle the $isMultipleDate written into the button part of the code itself. However... I noticed that the events_column.php file also hasn't been updated to use the common->buttons.php file that other templates have been adapted to use, so the fix might actually be to implement the button.php call :)

James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.

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

More
9 years 2 months ago #93538 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Column Layout: Details Button
Actually, it was my intentional to not display the details button in the layout because I was worry that there is not enough space

Will think more about it and might add the button back

Regards,

Tuan

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

Moderators: Tuan Pham Ngoc