Typoscript:如何创建控制浏览器/用户代理切换的弹出对话框
我有一个关于 Typocript 的问题,因为我想在 Typo3 中实现以下功能:
- 用户访问基于 Typo3(版本 4.3)的网站(用他的 iPhone)
- 用户会收到一个弹出对话框,他可以在其中选择是否访问该网站“标准”网站,或针对 iPhone 视图进行优化的网站
- 用户做出选择并被重定向到移动或标准网站
此时会发生以下情况:
- 当用户使用 iPhone 设备访问该网站时,他会自动重定向到移动网站
- 当用户使用任何其他浏览器或设备访问该网站时,他会被重定向到标准网站
我使用 Useragent-Switch 实现了这一点:
[useragent = *iPhone*]
page >
page = PAGE
page.meta.REFRESH = 0;index.php?id=xx
[end]
如果无法直接在 Typoscript 中实现它: 是否有人知道如何使用自己创建的扩展来实现这一点,该扩展调用弹出对话框并随后将用户重定向到页面 ID?
提前致谢, 芝士
I have a question regarding Typocript, because I want to realize the follwoing in Typo3:
- A user visits a website (with his IPhone) that is based on Typo3 (Version 4.3)
- The user gets a popup dialog where he can choose whether to visit the 'standard'-website, or the website that is optimized for the IPhone view
- The user makes his selection and is redirected to the mobile or standard website
This is what happens at the moment:
- When the user visits the website using the IPhone device, he is automatically redirected to the mobile-website
- When the user visits the website using any other Browser or device, he is redirected to the standard website
I realized this using a Useragent-Switch:
[useragent = *iPhone*]
page >
page = PAGE
page.meta.REFRESH = 0;index.php?id=xx
[end]
If there is no possibility to realize it directly in Typoscript: Does anyone know how to realize this using an self created extension, that calls a popup dialog and redirects the user afterwards to a page-id?
Thanks in advance,
Cheeesi
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您的用户使用 iPhone,他可能不喜欢真正的弹出窗口。
我会使用你的打字条件来添加一个 javascript 文件:
If your user is using an iphone, he might not like a real popup window.
I'd use your typoscript condition to add a javascript file: