- Posts: 55
- Thank you received: 0
Customise Course Detail Boxes
- Stefan Schoch
- Offline
- Senior Member
-
Less
More
9 years 8 months ago #85189
by Stefan Schoch
Replied by Stefan Schoch on topic Customise Course Detail Boxes
That would be great!
Here's the current field.xml:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<fields name="params">
<fieldset name="basic">
<field name="field_speaker" type="textarea" label="Leitung" size="500" description="" class="input-xxlarge"></field>
<field name="field_Booking" type="textarea" label="Buchung" size="500" description="" class="input-xxlarge"></field>
<field name="field_time" type="textarea" label="Zeiten" size="500" description="" class="input-xxlarge"></field>
<field name="field_recommended" type="text" label="empf. Spende" size="50" description=""></field>
<field name="field_normprice" type="text" label="empf. Preis" size="50" description=""></field>
<field name="field_venue" type="textarea" label="Location" size="500" description="" class="input-xxlarge"></field>
</fieldset>
</fields>
</config>
Here's the current field.xml:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<fields name="params">
<fieldset name="basic">
<field name="field_speaker" type="textarea" label="Leitung" size="500" description="" class="input-xxlarge"></field>
<field name="field_Booking" type="textarea" label="Buchung" size="500" description="" class="input-xxlarge"></field>
<field name="field_time" type="textarea" label="Zeiten" size="500" description="" class="input-xxlarge"></field>
<field name="field_recommended" type="text" label="empf. Spende" size="50" description=""></field>
<field name="field_normprice" type="text" label="empf. Preis" size="50" description=""></field>
<field name="field_venue" type="textarea" label="Location" size="500" description="" class="input-xxlarge"></field>
</fieldset>
</fields>
</config>
Please Log in or Create an account to join the conversation.
- James Riley
-
- Offline
- Platinum Member
-
9 years 8 months ago #85207
by James Riley
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 :.
Replied by James Riley on topic Customise Course Detail Boxes
Ah-ha. The venerable fields.xml file. My previous comments about editing <tr ... /tr> blocks don't apply.
Because we might be running different versions, let's first try getting you to make the modifications to your file. Save a copy of the original /components/com_eventbooking/views/common/tmpl/events_default.php to /templates/YOUR-TEMPLATE/html/com_eventbooking/common/tmpl/event_default.php, then make the following change to that file.
I haven't tested this code, but I think it should work. If it doesn't or something unexpected happens, just delete the file you created in your template/html directory.
Look for:
and replace with:
I've added 1 line (the first line), and modified the 5th line to include a check against the field name list from that 1st line addition.
You'll have to ensure that the items listed on the first line of the replacement text match the Field names in your fields.xml file.
Because we might be running different versions, let's first try getting you to make the modifications to your file. Save a copy of the original /components/com_eventbooking/views/common/tmpl/events_default.php to /templates/YOUR-TEMPLATE/html/com_eventbooking/common/tmpl/event_default.php, then make the following change to that file.
I haven't tested this code, but I think it should work. If it doesn't or something unexpected happens, just delete the file you created in your template/html directory.
Look for:
Code:
if (isset($event->paramData))
{
foreach ($event->paramData as $paramItem)
{
if ($paramItem['value'])
{
?>
<tr class="eb-event-property">
<td class="eb-event-property-label">
<?php echo $paramItem['title']; ?>
</td>
<td class="eb-event-property-value">
<?php
echo $paramItem['value'];
?>
</td>
</tr>
<?php
}
?>
<?php
}
}
and replace with:
Code:
$excludeItems = array('Zeiten','Location'); // Enter the item titles to exclude from view here. Syntax: ('item1-title','item2-title','item3-title') etc.
if (isset($event->paramData))
{
foreach ($event->paramData as $paramItem)
{
if (($paramItem['value']) && (in_array($paramItem['title'],$excludeItems) === false))
{
?>
<tr class="eb-event-property">
<td class="eb-event-property-label">
<?php echo $paramItem['title']; ?>
</td>
<td class="eb-event-property-value">
<?php
echo $paramItem['value'];
?>
</td>
</tr>
<?php
}
?>
<?php
}
}
You'll have to ensure that the items listed on the first line of the replacement text match the Field names in your fields.xml file.
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.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2026 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.