- Posts: 5
- Thank you received: 0
Need help with Joomla? We are available for hire to help with Joomla customization, upgrades, maintenance, and custom development.
Explore our services Adding structured data to Upcoming Events Module
- Tom Apelt
- Topic Author
- Offline
- New Member
-
Less
More
9 years 10 months ago - 9 years 10 months ago #91782
by Tom Apelt
Adding structured data to Upcoming Events Module was created by Tom Apelt
Hi
After a small problem with the sturctured data in the module - I started to add some structured data to the the "improved.php" in
/modules/mod_eb_events/tmpl
so I made the following changes to the original one
1. Initialization - Line 64 changed:
to
! It is important that you remove the class "vevent" from this line (even if you don´t want to impement structured data) because it causes errors with microformat.org
2. Adding the Date - After Line 65 i put
actually i just copied this line from the timeline view an changed the getdate() 
3. Adding URL: Changed line 86 from:
to
4. Adding Name - Line 95 from:
to
5. Adding location - and here i have still a little problem - so I added (copy paste from the timeline.php)
So i think this is a a very quick and dirty method - I am not very familiar with php. So has anybody a more elegant way with the address?
The other problem is, that it just show in the structured data test:
location
@type Place
name BLABLA
address
@type PostalAddress
so no street address/locality country etc, - So I guess I miss something... Can you help me with that? I attached my improved.php as zip-file.
So in general it is working - an Events are shown in the google search results -but i am not sure how relevant the missing address details are...
After a small problem with the sturctured data in the module - I started to add some structured data to the the "improved.php" in
/modules/mod_eb_events/tmpl
so I made the following changes to the original one
1. Initialization - Line 64 changed:
Code:
<li class="vevent clearfix row-fluid">
Code:
<li class="clearfix row-fluid" itemscope itemtype="http://schema.org/Event">
2. Adding the Date - After Line 65 i put
Code:
<meta itemprop="startDate" content="<?php echo JFactory::getDate($row->event_date)->format("Y-m-d\TH:i"); ?>">
3. Adding URL: Changed line 86 from:
Code:
<a class="url eb-event-link" href="<?php echo JRoute::_(EventbookingHelperRoute::getEventRoute($row->id, 0, $itemId), false); ?>">
Code:
<a class="url eb-event-link" href="<?php echo JRoute::_(EventbookingHelperRoute::getEventRoute($row->id, 0, $itemId), false); ?>" itemprop="url">
4. Adding Name - Line 95 from:
Code:
<strong class="summary"><?php echo $row->title ; ?></strong>
Code:
<strong class="summary" itemprop="name"><?php echo $row->title ; ?></strong>
5. Adding location - and here i have still a little problem - so I added (copy paste from the timeline.php)
Code:
<div style="display:none" itemprop="location" itemscope itemtype="http://schema.org/Place">
<div itemprop="name"><?php echo $row->location_name ; ?></div>
<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
<span itemprop="streetAddress"><?php echo $location->address; ?></span>
<?php
if ($location->city && $location->state && $location->zip)
{
?>
<span itemprop="addressLocality"><?php echo $location->city; ?></span>,
<span itemprop="addressRegion"><?php echo $location->state; ?></span>
<span itemprop="postalCode"><?php echo $location->zip; ?></span>
<span itemprop="addressCountry"><?php echo $location->country; ?></span>
<?php
}
?>
</div>
The other problem is, that it just show in the structured data test:
location
@type Place
name BLABLA
address
@type PostalAddress
so no street address/locality country etc, - So I guess I miss something... Can you help me with that? I attached my improved.php as zip-file.
So in general it is working - an Events are shown in the google search results -but i am not sure how relevant the missing address details are...
Last edit: 9 years 10 months ago by Tom Apelt.
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.