0
votes

Is it possible to link to a TYPO3 subpage with a specific UID using a simple HTML href-tag in the backend? I want to set a link to a subpage but I am not sure if I have to use Typoscript to do so. And if I have to: Is it possible to add my own Typoscript to the page without having administrative rights for the TYPO3 backend?

UPDATE: Did some more research and realized that another work-around might work: setting a href which points to an div element (and in my case a subpage) of a page; by that approach I would be able to 'jump' to a specific subpage by clicking on the respective link.

Might be a simple question but I would be glad about simple answers. Thanks!

1
TYPO3 is a CMS, which means content management system. Hence, there is an editor integrated in the backend where you can edit you content. Of course, one feature of this editor (regardless which one you actually use) is to create links to internal as well as external pages. Did you use the editor? Have you tried out the buttons it has? - Michael
If you really have to use HTML, you can create the link as <a href="/index.php?id=42">this is a link</a>. But be aware that this breaks all sorts of functionality: It won't respect the current language, page type and stuff like that. Also be aware that this breaks if you put your page in a subfolder. Best thing to do is what @Michael said. - Jost
Thanks for your comments! @Michael: I realize just now that I have been unspecific in my question! It's rather easy to add an link by the rich text editor, but how would you do it by plain HTML - a function TYPO3 offers, too? - JavascriptJJ
@Jost: That's what i tried, too - but it only works for whole pages in the menu tree, but not for those subpages you can add to the left, middle and right section of a summary page. I would like to set a link to one of those subpages and the only ID I could find is the UID. - JavascriptJJ
Still, there is no reason to use an HTML element just because it's possible. But anyway, you can target the link to any content element you like (I suppose with subpage you mean content element). Just use the id of as a hash, prefixed with c. Like index.php?id=42#c132. Of course, you can also create such links with the RTE. Instead of clicking on a page name in the popup, click on the little red arrow next to it, then you can choose from the of content elements on this page. - Michael

1 Answers

0
votes

You can enable the HTML content element to parse links in the following format:

<link [PID]>My link</link>

Of course you need to replace [PID] with the ID of the page you want to link to.

To enable the parsing, use the following TypoScript e.g. on your root page:

tt_content.html.parseFunc.tags.link < lib.parseFunc.tags.link

That means that the TypoScript configuration from lib.parseFunc.tags.link is applied to every tag of type link in the html content element.

Source: http://blog.dev001.net/post/29486186488/typo3-parsing-tags-in-raw-html-content-elements