问题
im working with Claus' Fluid Powered TYPO3 and I'm quiet happy with it. At the moment I have to implement a template wich should contain another extension (e.g. news) in the sidebar.
What is the preferred way to implement this.
My idea was to add the f:cObject
ViewHelper and insert the extension in that way.
Is this the correct approach?
Thx
Markus
回答1:
This depends on the type of template you are building:
- Page templates should have proper content areas into which you can insert content. If the content needs to be shared, you have a few options: a) create the element in a sys folder and reference it from your Flux form settings then use
v:content.render
to render it by UID. b) Place any number of shared elements in a sys folder and render all by PID. c) Use content sliding in a column in your template which is there in all templates and is designed to contain elements which "slide" to every subpage (and can also be edited on subpages if editor has access). - Content templates can use
flux:grid
withflux:form.column
, orflux:form.content
as a shortcut to quickly make a single column, to add a content area, thenflux:content.render
to render those elements. This allows you to control that gets rendered around the plugin. - Plugin templates can associate a Flux form and use the steps described in point 2.
I think you're looking for 1a) or 1c) in this case.
来源:https://stackoverflow.com/questions/24202619/preferred-way-to-add-an-extensions-into-fluid-powered-typo3-template