简体   繁体   中英

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. I am quite new to TYPO3, we want to integrate a nice looking blog with different categories in the website. 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. Please donot recommend to use blog extension from TYPO3.

Ideally, we want to have a blog in Wordpress and integrate the link to this blog in our TYPO3 website. 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). 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. Any helpful links or tutorials regarding how a wordpress page can be integrated in TYPO3 will also be super helpful. 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

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:

在此处输入图片说明

Solution with 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 .

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.

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.

References:
- HMENU
- Menu Objects (sub-objects of HMENU )
- typolink

the problem might be menu, which contains parts from two CMSs.

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.

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. I don't know how this can be done in wordpress.

if you have more than static page(s) of wordpress inside the TYPO3 menu you need a similar solution vice versa.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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