简体   繁体   English

如何在TYPO3网站的导航栏中集成Wordpress博客

[英]How to integrate a Wordpress blog in the navigation bar in a TYPO3 website

I am working a website that is built by using TYPO3. 我正在使用TYPO3构建的网站。 I am quite new to TYPO3, we want to integrate a nice looking blog with different categories in the website. 我是TYPO3的新手,我们希望将一个漂亮的博客与网站中的不同类别集成在一起。 Although there are a couple of blog exrensions that are provided from TYPO3 but a lot of customization that has to be done in the templates. 尽管TYPO3提供了两个博客功能,但是模板中必须完成许多自定义操作。 Please donot recommend to use blog extension from TYPO3. 请不要建议使用TYPO3的博客扩展。

Ideally, we want to have a blog in Wordpress and integrate the link to this blog in our TYPO3 website. 理想情况下,我们希望在Wordpress中拥有一个博客,并在我们的TYPO3网站中集成到该博客的链接。 Blog will be a menu item in the top navigation bar in TYPO3 website, when a user clicks Blog he will be taken to a blog (done in Wordpress). 博客将是TYPO3网站顶部导航栏中的菜单项,当用户单击博客时,他将被带到博客(在Wordpress中完成)。 Header and footer will remain same as we have in the website. 页眉和页脚将与我们在网站上保持不变。 Could some body please give any ideas that how it can be done like what changes I have to make in TYPO3 backend or in wordpress. 可以请任何机构给出一些想法,例如我必须在TYPO3后端或wordpress中进行哪些更改。 Any helpful links or tutorials regarding how a wordpress page can be integrated in TYPO3 will also be super helpful. 关于如何将WordPress页面集成到TYPO3中的任何有用的链接或教程也将非常有帮助。 I already looked but was not really able to find any concrete info online. 我已经看过了,但并不能真正在网上找到任何具体信息。

In general the question is just how to integrate a link to a foreign page or domain in the menu. 通常,问题是如何在菜单中集成到外部页面或域的链接。

The easiest approach is to create a special page for the blog in the page-tree and choose the type 最简单的方法是在页面树中为博客创建一个特殊页面,然后选择类型

Link to external URL 链接到外部URL

Like this you can create a common Menu and the link to the blog is automatically part of the menu. 这样,您可以创建一个通用菜单,并且指向博客的链接自动成为菜单的一部分。 The advantage is that you also can count and track clicks on the link. 好处是您还可以计算和跟踪链接上的点击。

The screenshot is made in a very old version of TYPO3 but in general the important options in the form are still the same: 屏幕截图是在TYPO3的很旧的版本中制作的,但总体上,表单中的重要选项仍然相同:

在此处输入图片说明

Solution with TYPOScript TYPOScript解决方案

While the common HEMNU in TypoScript is usually used to implement local pages inside the system, there exists a different option to include foreign links with stdWrap.typolink . 虽然通常使用TypoScript中常见的HEMNU来实现系统内部的本地页面,但存在另一种选择,以将外部链接包含在stdWrap.typolink

This approach is to create a COA where several content-elements can be defined including HMENU and also some text that is linked by stdWrap.typolink to foreign targets like the blog. 这种方法是创建一个COA ,其中可以定义多个内容元素,包括HMENU以及通过stdWrap.typolink链接到外部目标(如博客)的一些文本。

page.100 = COA
page.100 {
    wrap = <ul>|</ul>
    10 = HEMNU
    10 {
       ... [common pagemenu]
    }
    20 = TEXT
    20.value = Blog
    20.stdWrap.typolink.parameter = https://example.com
    20.stdWrap.typolink.extTarget = _blank
    20.wrap = <li>|</li>

    30 = HMENU
    30 {
       ... [another menu]
    }
}

Assumed you want the blog being opened in a new tab / window I added the line 20.stdWrap.typolink.extTarget = _blank , just remove that line if it's not desired. 假设您希望在新的选项卡/窗口中打开博客,我添加了20.stdWrap.typolink.extTarget = _blank行,如果不需要,只需删除该行。

References: 参考文献:
- HMENU -H菜单
- Menu Objects (sub-objects of HMENU ) - 菜单对象( HMENU子对象)
- typolink - 错字链接

the problem might be menu, which contains parts from two CMSs. 问题可能出在菜单上,其中包含来自两个CMS的部件。

if you only have fixed URLs which are from the non-TYPO3 system you can use pages of type 'external url' to build a menu with links outside of TYPO3. 如果您只有来自非TYPO3系统的固定URL,则可以使用“外部URL”类型的页面来构建包含TYPO3外部链接的菜单。

for external systems we have used a special pagetype to render only the header or footer, so they can be used in the external system. 对于外部系统,我们使用了特殊的pagetype来仅呈现页眉或页脚,因此可以在外部系统中使用它们。 I don't know how this can be done in wordpress. 我不知道如何在Wordpress中完成此操作。

if you have more than static page(s) of wordpress inside the TYPO3 menu you need a similar solution vice versa. 如果TYPO3菜单中的wordpress静态页面超过一个,则需要类似的解决方案,反之亦然。

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

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