hauerheinrich / hh-tt-address-places
为EXT:tt_address简单添加地点/公司TCA。
Requires
- friendsoftypo3/tt-address: ^7.0.0
- typo3/cms-core: ^11.5.0 || ^12.4.0
Replaces
- hauer-heinrich/hh_tt_address_places: 3.0.0
- typo3-ter/hh-tt-address-places: 3.0.0
This package is auto-updated.
Last update: 2024-09-12 12:54:40 UTC
README
hh_tt_address_places是一个TYPO3扩展。使用tt_address不仅可用于管理/交付个人地址,还可用于位置/公司地址(包括营业时间)。
安装
...就像其他TYPO3扩展extensions.typo3.org一样。别忘了包括PageTS -> backend -> rootPage -> 网站配置 -> 资源!
配置
将PageTs添加到页面/目录(从TYPO3 BE站点树)。保留默认的tt_address(人员)和hh_tt_address_places(地点/公司)在单独的页面/目录中!(可选)将PageTs(hh_tt_address_places - 只允许地点/公司)添加到您的地点/公司的存储位置。
使用方法
您应该拥有EXT:tt_address插件的所有功能,因此请使用tt_address插件来显示地点/公司,就像“正常”的tt_address条目一样。对于营业时间:在hh_tt_address_places/Resources/Private/Partials/中提供了FLUID输出的示例。
视图辅助函数
openHoursMerged
使用示例:(输入可以是任何支持的日期和时间格式)。可选:timeformat(默认:H:i)。
$openingHours描述,支持午餐休息等:open_monday:早上开门时间(08:00:00),close_monday:早上关门时间(12:00:00),open_monday2:下午开门时间(13:00:00),close_monday2:下午关门时间(17:00:00)结果为08:00 - 12:00,13:00 - 1700
如果您不想显示午餐休息等,请使用open_monday和close_monday2作为开门和关门时间。open_monday:早上开门时间(08:00:00),close_monday2:下午关门时间(17:00:00)结果为08:00 - 17:00
$openingHours = [
'open_monday' => '08:00:00',
'close_monday' => '18:30:00',
'open_monday2' => '00:00:00',
'close_monday2' => '00:00:00',
'open_tuesday' => '13:00:00',
'close_tuesday' => '18:30:00',
'open_tuesday2' => '00:00:00',
'close_tuesday2' => '00:00:00',
'open_wednesday' => '08:00:00',
'close_wednesday' => '18:30:00',
'open_wednesday2' => '00:00:00',
'close_wednesday2' => '00:00:00',
'open_thursday' => '08:00:00',
'close_thursday' => '12:30:00',
'open_thursday2' => '13:00:00',
'close_thursday2' => '18:00:00',
'open_friday' => '08:00:00',
'close_friday' => '18:30:00',
'open_friday2' => '00:00:00',
'close_friday2' => '00:00:00',
'open_saturday' => '09:00:00',
'close_saturday' => '12:00:00',
'open_saturday2' => '00:00:00',
'close_saturday2' => '00:00:00',
'open_sunday' => '00:00:00',
'close_sunday' => '00:00:00',
'open_sunday2' => '00:00:00',
'close_sunday2' => '00:00:00',
];
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
xmlns:places="http://typo3.org/ns/HauerHeinrich/HhTtAddressPlaces/ViewHelpers"
data-namespace-typo3-fluid="true">
<f:variable name="openHours"><places:openHoursMerged hours="{openingHours}" timeFormat="H:i" /></f:variable>
<f:if condition="{openHours}">
<f:for each="{openHours}" as="hours">
<span>{hours}</span>
<f:comment>{hours} = e. g. "Monday - Friday: 08:00 - 18:30"</f:comment>
</f:for>
</f:if>
通过TypoScript进行翻译,例如星期几。
plugin.tx_hh_tt_address_places {
_LOCAL_LANG {
de {
day.monday = Montag
day.tuesday = Dienstag
day.wednesday = Mittwoch
day.thursday = Donnerstag
day.friday = Freitag
day.saturday = Samstag
day.sunday = Sonntag
day.hour = Uhr
day.appointment = nur nach Vereinbarung
}
}
}
开发
想要贡献?太好了!
预览图片
版权声明
此存储库是TYPO3项目的一部分。TYPO3项目是免费软件;您可以在自由软件基金会发布的GNU通用公共许可证的条款下重新分发和/或修改它;许可证的第2版,或(根据您的选择)任何较新版本。
GNU通用公共许可证可在https://gnu.ac.cn/copyleft/gpl.html找到。
此存储库是根据希望它将是有用的,但没有任何保证;甚至没有关于其可销售性或适用于特定目的的暗示性保证。有关更多详细信息,请参阅GNU通用公共许可证。
此版权声明必须在存储库的所有副本中显示!
许可证
GNU通用公共许可证版本3