Categories
Typo3

TYPO3: Getting content from another page

This is a TYPO3 code snippet that will replace a marker with content from a specific page. I use this for common content on footers and outer columns.

page.10.marks.FOOTER < styles.content.get
page.10.marks.FOOTER {
      select.where = colPos=3
      select.pidInList = 2
}

colPos=3 will get the content from the border column (0 is center, 1 is left, 2 is right column). pidInList identifies the page (or pages) that you want to fetch the content from.

8 replies on “TYPO3: Getting content from another page”

OK I’ve done that, but I’m missing something somewhere. How do you get it to display on each page?

What I’m trying to do is put a copyright notice at the bottom of every page.

I tried typing ###FOOTER### in a standard text element, and it just put ###FOOTER### on my page. I assume that this bit of code defines a marker called FOOTER, and wherever that appears it substitutes the elements that are contained on pid in the colPos. In my case it’s the center column, and the page I’m fetching it from has a single text element containing the notice I want at the bottom of each page.

Sorry for the basic questions. I’m still learning my way around scripting and coding in typo3.

We all were newbies one day ;o)

Put ###FOOTER### at the bottom of your HTML template (I assume you already created one). Usually this is located in fileadmin/ directory. Please note, that this is not in TYPO3 but on your filesystem.

Then, in TYPO3 create a special page like “Common Content” (make it “Not in Menu”) and insert the text element with your actual footer content.

Finally, in your TYPO3 template (section Templates), use the code snippet published above using the page ID of your special page and the FOOTER marker name.

Hi,

I have a working TYPO3 7.6.10 installation with working SOLR search but I want to use it in my HTML template like this “”
I am new to typo3. Please help me with this.

Thank you

Jasvinder Singh

Leave a Reply

Your email address will not be published.