Skip to content

Commit

Permalink
adding schema.org microdate
Browse files Browse the repository at this point in the history
  • Loading branch information
hamidpeywasti committed Jul 29, 2017
1 parent ee7d70e commit fe71492
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
15 changes: 8 additions & 7 deletions templates/product/product_full.html5
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@

<div class="product_full<?= $this->class; ?>">

<h1><?= $this->title; ?></h1>
<div itemscope itemtype="http://schema.org/Product" class="product_full<?= $this->class; ?>">

<h1 itemprop="name"><?= $this->title; ?></h1>

<?php if ($this->hasMetaFields): ?>
<div class="info">

<time datetime="<?= $this->datetime; ?>"><?= $this->date; ?></time>

<?php if($this->meta_brand): ?><span class="brand"><?= $this->meta_brand; ?></span><?php endif; ?>
<?php if($this->meta_brand): ?><span itemprop="brand" class="brand"><?= $this->meta_brand; ?></span><?php endif; ?>
<?php if($this->meta_model): ?><span class="model"><?= $this->meta_model; ?></span><?php endif; ?>
<?php if($this->meta_code): ?><span class="code"><?= $this->meta_code; ?></span><?php endif; ?>
<?php if($this->meta_sku): ?><span class="sku"><?= $this->meta_sku; ?></span><?php endif; ?>
<?php if($this->meta_sku): ?><span itemprop="sku" class="sku"><?= $this->meta_sku; ?></span><?php endif; ?>
<?php if($this->meta_buy): ?>
<span class="buy">
<a href="<?= $this->url ?>" class="hyperlink_txt" title="<?= $this->linkTitle ?>" <?php if($this->target): ?> target="_blank" rel="nofollow" <?php endif; ?> >
<span itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="buy">
<a itemprop="url" href="<?= $this->url ?>" class="hyperlink_txt" title="<?= $this->linkTitle ?>" <?php if($this->target): ?> target="_blank" rel="nofollow" <?php endif; ?> >
<?php if($this->titleText): ?>
<?= $this->titleText ?>
<?php else: ?>
Expand All @@ -35,7 +34,9 @@
<?php endif; ?>

<?php if ($this->text): ?>
<div itemprop="description">
<?= $this->text; ?>
</div>
<?php endif; ?>

<?php if ($this->enclosure): ?>
Expand Down
14 changes: 7 additions & 7 deletions templates/product/product_short.html5
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<div class="product_short<?= $this->class; ?>">
<div itemscope itemtype="http://schema.org/Product" class="product_short<?= $this->class; ?>">

<figure class="image_container<?= $this->floatClass; ?>"<?php if ($this->margin): ?> style="<?= $this->margin; ?>"<?php endif; ?>>

Expand All @@ -25,8 +25,8 @@
</figure>


<div class="title">
<?php if ($this->link): ?> <a href="<?= $this->link; ?>"> <?php endif; ?>
<div itemprop="name" class="title">
<?php if ($this->link): ?> <a itemprop="url" href="<?= $this->link; ?>"> <?php endif; ?>
<?= $this->title; ?>
<?php if ($this->link): ?> </a> <?php endif; ?>
</div>
Expand All @@ -35,16 +35,16 @@
<div class="info">

<time datetime="<?= $this->datetime; ?>"><?= $this->date; ?></time>
<?php if($this->meta_brand): ?><span class="brand"><?= $this->meta_brand; ?></span><?php endif; ?>
<?php if($this->meta_brand): ?><span itemprop="brand" class="brand"><?= $this->meta_brand; ?></span><?php endif; ?>
<?php if($this->meta_model): ?><span class="model"><?= $this->meta_model; ?></span><?php endif; ?>
<?php if($this->meta_code): ?><span class="code"><?= $this->meta_code; ?></span><?php endif; ?>
<?php if($this->meta_sku): ?><span class="sku"><?= $this->meta_sku; ?></span><?php endif; ?>
<?php if($this->meta_sku): ?><span itemprop="sku" class="sku"><?= $this->meta_sku; ?></span><?php endif; ?>

</div>

<?php if($this->meta_buy): ?>
<div class="buy">
<a href="<?= $this->url ?>" class="hyperlink_txt" title="<?= $this->linkTitle ?>" <?php if($this->target): ?> target="_blank" rel="nofollow" <?php endif; ?> >
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="buy">
<a itemprop="url" href="<?= $this->url ?>" class="hyperlink_txt" title="<?= $this->linkTitle ?>" <?php if($this->target): ?> target="_blank" rel="nofollow" <?php endif; ?> >
<?php if($this->titleText): ?>
<?= $this->titleText ?>
<?php else: ?>
Expand Down

0 comments on commit fe71492

Please sign in to comment.