fbpx

Astroid 2.4 Landed with Joomla 4 Compatibility Download Now

Welcome, Guest
Username: Password: Remember me

TOPIC: How to add Schema.org Microdata contact details

How to add Schema.org Microdata contact details 1 week 19 hours ago #25165

  • SXGuy
  • SXGuy's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Karma: 0
Im currently using Template Zero default. At the very top of the page it shows my contact details, address, email telephone etc. I wish to wrap these details using the schema.org microdata itemprop classes.

Ive managed to wrap the itemprop class around the address inside the template settings, but im having trouble locating where i could add itemscope itemtype.

Could you direct me to the actual template file in which i can wrap the output data with the itemscope class?
The administrator has disabled public write access.

How to add Schema.org Microdata contact details 1 week 10 hours ago #25184

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 4131
  • Thank you received: 605
  • Karma: 107
Hi,

It's the following file.

github.com/joomdev/Astroid-Framework/blo...tend/contactinfo.php

If you end up making the changes, do post back here so we can add those to the official repo.

Also, don't modify the file as it will be overwritten with the next update. Instead override it.

Thanks,
Chetan
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.
The administrator has disabled public write access.

How to add Schema.org Microdata contact details 1 week 9 hours ago #25187

  • SXGuy
  • SXGuy's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Karma: 0
Thank you for the information.

I created the override and placed it in ROOT/templates/YOURTEMPLATE/html/frontend/

but it doesnt appear to override the original contactinfo.php located at ROOT/templates/YOURTEMPLATE/frontend

Perhaps im missing something?

Further, Im unable to provide you with the changes, as i have had to bypass the template settings and add the changes directly to the file, for example, in contact information under the heading Miscellaneous, the address field is used to just type the full address, but the schema markup should seperate the address in to streetAddress, addressLocality, addressRegion and postalCode.

In order for the modification to work, while including the template option contact information, the data input, would need to include additional fields in order to separate the address lines.

<?php echo $address; ?> would need to change to
<?php echo $street;?> <?php echo $locality;?> <?php echo $region;?> <?php echo $postcode;?>

Then you could apply the schema mark up as
<div itemscope itemtype="schema.org/PostalAddress">
<span itemprop="streetAddress"><?php echo $street;?>, </span>,
<span itemprop="addressLocality"><?php echo $locality;?>, </span>
<span itemprop="addressRegion"> <?php echo $region;?>, </span>
<span itemprop="postalCode"><?php echo $postcode;?></span>
</div>
The administrator has disabled public write access.

How to add Schema.org Microdata contact details 2 days 7 hours ago #25269

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 4131
  • Thank you received: 605
  • Karma: 107
I see, we'll actually just have to change the fields in the backend to support this. I'll see what can be done.

The overrides should be working fine.
Try adding it to the root/templates/YOURTEMPLATE/frontend/ folder if html/frontend doesn't work.

Thanks,
Chetan
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.
The administrator has disabled public write access.
Moderators: chandandeep
Time to create page: 0.291 seconds