简体   繁体   English

结构化数据(schema.org)-教育组织的开放时间

[英]Structured Data (schema.org) - openingHours for EducationalOrganization

I'm just about to expand my templates with schema.org attributes and have the following question. 我正准备使用schema.org属性扩展模板,并遇到以下问题。 With which property can I specify the opening hours for the type EducationalOrganization ? 我可以通过哪个属性指定EducationalOrganization类型的开放时间? Unfortunately, the openingHours property is not available here. 不幸的是, openingHours属性在这里不可用。 In addition, there is no type similar to the EducationalOrganization type. 此外,没有类似于EducationalOrganization类型的类型。

Here is the current state of my code: 这是我的代码的当前状态:

<div itemscope itemtype="http://schema.org/EducationalOrganization" class="ce_text address block">
    <div class="text_container">
        <p>
            <span>
                <strong itemprop="name"><?php echo $this->field('company')->value(); ?></strong><br>
            </span>
        <p itemscope itemtype="http://schema.org/PostalAddress" itemprop="address">
            <span itemprop="streetAddress">
                <?php echo $this->field('street')->value(); ?><br>
            </span>
            <span itemprop="postalCode">
                <?php echo $this->field('zipcode')->value(); ?>
            </span>
            <span itemprop="addressLocality">
                <?php echo $this->field('place')->value(); ?>
            </span>
        </p>
        <p>
            Aus dem Ausland: <span itemprop="telephone"><?php echo $this->field('phone_foreign')->value(); ?></span><br>
            Fax: <span itemprop="telephone"><?php echo $this->field('fax')->value(); ?></span>
        </p>
        <p itemscope itemtype="??????"> <!-- What type can I use here? -->
            <strong>Öffnungszeiten:</strong><br>
            Montag bis Donnerstag: <meta itemprop="openingHours" content="Mo-Th 08:00-18:00"><?php echo $this->field('mothu')->value(); ?><br>
            Freitag: <meta itemprop="openingHours" content="Fr 08:00-15:00"><?php echo $this->field('fri')->value(); ?>
        </p> <!-- Öffnungszeiten Ende -->
    </div>
</div>

What type can I use in this case to use the itemprop="openingHours" property or is there another workarount, if this is not possible? 在这种情况下,我不能使用哪种类型来使用itemprop =“ openingHours”属性,或者如果无法实现,是否还有其他工作方法?


UPDATE: 更新:

I have chosen this solution in the meantime. 同时,我选择了此解决方案。 It is read out cleanly by Google and makes more sense in the case of our company. 谷歌会干净地读取它,对我们公司来说更有意义。

    <div itemscope itemtype="http://schema.org/Service">
        <strong>Öffnungszeiten:</strong><br>
        Montag bis Donnerstag: <?php echo $this->field('mothu')->value(); ?><br>
        Freitag: <?php echo $this->field('fri')->value(); ?>
        <div itemprop="hoursAvailable" itemscope itemtype="http://schema.org/OpeningHoursSpecification">
            <link itemprop="dayOfWeek" href="http://schema.org/Monday" />
            <time itemprop="opens" content="08:00:00"></time>
            <time itemprop="closes" content="18:00:00"></time>
        </div>
        <div itemprop="hoursAvailable" itemscope itemtype="http://schema.org/OpeningHoursSpecification">
            <link itemprop="dayOfWeek" href="http://schema.org/Tuesday" />
            <time itemprop="opens" content="08:00:00"></time>
            <time itemprop="closes" content="18:00:00"></time>
        </div>
        <div itemprop="hoursAvailable" itemscope itemtype="http://schema.org/OpeningHoursSpecification">
            <link itemprop="dayOfWeek" href="http://schema.org/Wednesday" />
            <time itemprop="opens" content="08:00:00"></time>
            <time itemprop="closes" content="18:00:00"></time>
        </div>
        <div itemprop="hoursAvailable" itemscope itemtype="http://schema.org/OpeningHoursSpecification">
            <link itemprop="dayOfWeek" href="http://schema.org/Thursday" />
            <time itemprop="opens" content="08:00:00"></time>
            <time itemprop="closes" content="18:00:00"></time>
        </div>
        <div itemprop="hoursAvailable" itemscope itemtype="http://schema.org/OpeningHoursSpecification">
            <link itemprop="dayOfWeek" href="http://schema.org/Friday" />
            <time itemprop="opens" content="08:00:00"></time>
            <time itemprop="closes" content="15:00:00"></time>
        </div>
    </div>

Try CivicStructure or GovernmentOffice. 尝试使用CivicStructure或GovernmentOffice。
For Educational Organisations such as school, university there is no need to scope the opening hours. 对于学校,大学等教育组织,无需确定开放时间。 Maybe your organisation is not Educational and you can use another scope for your organisation. 也许您的组织不是教育性的,您可以为组织使用其他范围。

Create something similar: 创建类似的东西:

 <main itemscope itemtype="http://schema.org/EducationalOrganization"> <h1 itemprop="name">Name of Organization</h1> <section itemprop=contactPoint itemscope itemtype=http://schema.org/ContactPoint> <h2>Opening hours</h2> <meta itemprop="hoursAvailable" content="Mo,Tu,We,Th,Fr,Sa,Su 09:00-14:00"> <p>Normally open daily <time datetime="09:00">9am</time>-<time datetime="14:00">2pm</time></p> </section> </main> 

Check the structured data on this Google tool and set the required data. 此Google工具上检查结构化数据,然后设置所需数据。 Hope this helps. 希望这可以帮助。

UPDATE/SOLUTION: 更新/解决方案:

I have chosen this solution in the meantime. 同时,我选择了此解决方案。 It is read out cleanly by Google and makes more sense in the case of our company. 谷歌会干净地读取它,对我们公司来说更有意义。

    <div itemscope itemtype="http://schema.org/Service">
        <strong>Öffnungszeiten:</strong><br>
        Montag bis Donnerstag: <?php echo $this->field('mothu')->value(); ?><br>
        Freitag: <?php echo $this->field('fri')->value(); ?>
        <div itemprop="hoursAvailable" itemscope itemtype="http://schema.org/OpeningHoursSpecification">
            <link itemprop="dayOfWeek" href="http://schema.org/Monday" />
            <time itemprop="opens" content="08:00:00"></time>
            <time itemprop="closes" content="18:00:00"></time>
        </div>
        <div itemprop="hoursAvailable" itemscope itemtype="http://schema.org/OpeningHoursSpecification">
            <link itemprop="dayOfWeek" href="http://schema.org/Tuesday" />
            <time itemprop="opens" content="08:00:00"></time>
            <time itemprop="closes" content="18:00:00"></time>
        </div>
        <div itemprop="hoursAvailable" itemscope itemtype="http://schema.org/OpeningHoursSpecification">
            <link itemprop="dayOfWeek" href="http://schema.org/Wednesday" />
            <time itemprop="opens" content="08:00:00"></time>
            <time itemprop="closes" content="18:00:00"></time>
        </div>
        <div itemprop="hoursAvailable" itemscope itemtype="http://schema.org/OpeningHoursSpecification">
            <link itemprop="dayOfWeek" href="http://schema.org/Thursday" />
            <time itemprop="opens" content="08:00:00"></time>
            <time itemprop="closes" content="18:00:00"></time>
        </div>
        <div itemprop="hoursAvailable" itemscope itemtype="http://schema.org/OpeningHoursSpecification">
            <link itemprop="dayOfWeek" href="http://schema.org/Friday" />
            <time itemprop="opens" content="08:00:00"></time>
            <time itemprop="closes" content="15:00:00"></time>
        </div>
    </div>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM