Configure TT_News - typo3

I'm searing for several hours but can not found an good example on how to configure the tt_news extension with typoscript. I would like to know how I can disable showing the date, cat info and archive to make it a simple overview. Also clicking on the news item does not show the single page? Can any one post an simple example of typoscript for configuring an simple news overview with the tt_news extension?

I think the tt_news documentation will answer all your questions.
Your first issue is very simple to solve: just use your own templates and remove the corresponding marker.
Copy the template from tt_news/pi/tt_news_v2_template.html to somewhere else, e.g. into fileadmin/myproject/tt_news_v2_template.html
Configure tt_news with the new location of the template in your TypoScript Constants: plugin.tt_news.file.templateFile = fileadmin/myproject/tt_news_v2_template.html (you have to include the static TypoScript of tt_news too)
Your second issue seems to be a problem with the single pid configuration. You can solve this with defining your single page in the TypoScript Constants:
plugin.tt_news.singlePid = 123
It seems that you are new to TYPO3 and tt_news, so maybe you should simply follow the quick start guide in the tt_news documentation.

Related

TYPO3 tt_news - show hidden news

on TYPO3 with the tt_news extension, my contributors would like to previews news before publishing ; Problem : impossible to get a preview if the news is hidden. Our website is big and we can't display the news before to finish it, even for preview for a few seconds.
According to this documentation :
If a preview of hidden records needs to be allowed too, the checkbox
“Allow hidden records” needs to be checked in the plugin.
No way to find this checkbox.
Do you have any solution ?
According to the tt_news documentation, you have to set the following Page TSconfig:
tx_ttnews.singlePid = 37
where 37 is the UID of the page containing the single view plugin.
Apparently this functionality is currently broken:
https://forge.typo3.org/issues/67304
https://forge.typo3.org/issues/75768
The second issue on forge.typo3.org provides a possible solution which should work in general with all records of any extension (TYPO3 v7 and above!). Again, Page TSconfig (no TypoScript):
TCEMAIN.preview {
tt_news {
previewPageId = 37
useDefaultLanguageRecord = 0
fieldToParameterMap {
uid = tx_ttnews[tt_news]
}
}
}
I successfully tested this in TYPO3 v7. One major drawback – as already noted in your question – is that this does not work with hidden records.
Previewing hidden records result in the error message
no news_id given
Edit: As Bernd suggested, you could make use of categories to hide drafts of news records and use the preview solution above:
If you already use news categories: Set the category mode in the list view plugin(s) of tt_news to hide news records which do not own the desired categories. Let the editors assign the categories only if the content is ready.
Otherwise: use a new category preview – as Bernd suggested – and hide records with this category in the list view plugin.
The latter is a bit more risky to use for editors, as they could forget to set this temporary category. Nonetheless, you as an integrator could use the TSconfig TCAdefaults to automatically assign this preview category to all new records. The editors would only have to remove the category when the news record is completed.
Another possible workaround could be to save drafts in a separate folder which is not used by the list view plugin of tt_news. Then you also could use the preview solution above.
If that's not the right way of working for you or your editors, you could try using the workspaces extension which ships with the TYPO3 core.
a clean solution would be the usage of workspaces. but not all extension support it.
so another option would be to simulate workspaces:
build a page where your news can be seen and secure it with a login. so if only the new records should be shown you might create a 'preview' category, which is shown only on the special preview page.

TYPO3: HTML template on multiple pages

I have installed TYPO3 and am working with a HTML template and markers to display content.
There is only one thing i am asking myself:
I have several pages with the same layout but different content and I only want to change parts of these contents.
Do I have to implement a specific template for every page to make this work or is there any other way?
(the red marked content shall be changed only)
I hope you got the point what I want to achieve and can answer my question.
there is a bootstrap introduction package that you can install (look at packages in the extension module)
https://typo3.org/extensions/repository/view/introduction
based on:
https://typo3.org/extensions/repository/view/bootstrap_package
there is no need for gridelements or DCE.
when you are a TYPO3 beginner, the introduction package gives you a good start because it stays close tho the TYPO3 'core' way of creating a website.
After you have learned how to create basic templates (with backend layouts & FLUIDTEMPLATES) you can deep into other extension like DCE or gridelements.
You can either create a template for each page or use one template for the whole content and then use some other extensions to create the grid view.
For this job the best extensions are:
dce - dynamic content element dce extensions
-- or --
gridelements gridelements extension

May I use variables in Page TSConfig - Typo3 in order to set dynamic content?

I am looking for a way to be able to set some content dynamically in the layout of a typo3 site.
For example, is there a way to set dynamically the title of the site?
So, I am wondering if is it possible to define some variables in Page TSConfig area as shown in the following image.
This option would be very usefull in cases where users are not so experienced to edit this content from Template tools --> Setup.
Thanks a lot!!!
Only admins have access to pages TSconfig field. They have access to the template record (and the TypoScript module) too.
Therefore you should use constants instead which do exactly what you want to archive.
Have a look at the TYPO3 documentation: https://docs.typo3.org/typo3cms/TyposcriptSyntaxReference/TypoScriptTemplates/Index.html
Define in constants:
# cat=page type=string; label=Page Title
title = foo
And use in setup:
config.pageTitle = {$title}

tt_news - How to add comments in tt_news single view?

I setup my own tt_news template and currently try to use the "comments" plugin. After installing and import the standard plugin constants it should show the comments automaticly (so I've read it). But no. Nothing.
How do I get the comments into my tt_news single template?
you also have to insert the comments plugin on the news single page, below the news plugin with single view.
Here you can read about this in the extension manual:
comments manual in TER
Regards
Patrick

Many doubts about TYPO3 template system

I am very new in TYPO3 (I came from Joomla and WordPress) and I am having difficulties in understanding how templates are handled in TYPO3 (it seems to me that the situation is more complex in TYPO3 than it is in Joomla and in WordPress).
I have installed and I am testing this version of TYPO3 introductionpackage-6.1.3.zip
In Joomla and in WordPress a template simply is an HTML structure (which are marked in the various areas of the page where the CMS modules will be placed) and the related CSS settings.
In TYPO3 it seems to me that the situation is very different or am I wrong?
At this moment I am reading this section of the official documentation that references the default template of the TYPO3 Introduction Package: http://docs.typo3.org/typo3cms/GettingStartedTutorial/Templates/Index.html
The difference between static content and dynamic content of a website created using a CMS is pretty clear to me (this is not different from any others CMS like Joomla or WP)
Dynamic content: is something that is dynamically created by the CMS (executing some queries) as a menu (it look into a DB table and then a script renders the menu on the page)
Static content: is something that is fixed as the title of the website or a background image
Until now I think that it is pretty clear for me but I have many doubts when the documentation speaks about the Template Record as a way to implement the previous principle.
Here: http://docs.typo3.org/typo3cms/GettingStartedTutorial/Templates/%28%28generated%29%29/Index.html
it says that:
This is a control element that instructs TYPO3 how to handle a certain
branch of the page tree.
In particular with this image it shows how to modify these template records for the Introduction Package Template (Introduction Package is also the name of the template provided with this package or what?):
Then on this section on the documentation it says:
If you edit the template "Introduction Package" you will see that most
fields are empty. For each website you need a TypoScript template on
the ROOT level, in this case that is the "Introduction Package"
template. The TypoScript configuration of a website can be quite long
therefore it is possible to make many small TypoScript templates that
get included in the main template. For better maintenance, all
TypoScript of the Introduction Package has been put into the folder
'Typoscript Templates'. The only thing the "Introduction Package"
template does is to include the "ROOT" template that in turn includes
other templates.
And this is totaly obscure for me: I have understood that TypoScript is a configuration language that can be used to configure the frontend (so I think that I can use it to configure how my page will appear) but I can't understand the following assertions:
What does this mean: For each website you need a TypoScript template on the ROOT level, in this case that is the "Introduction Package" template ? I have installed TYPO3 Introduction Package and I have only a web site !!! What is the ROOT level of the website? Is it the Welcome to TYPO3 node in the List section Tree? So in pracatice I am assigning a specific template to the root of a website and this is used in all subnodes (all the pages as Home, About TYPO3, Features, etc)?
What does it mean when it says: For better maintenance, all TypoScript of the Introduction Package has been put into the folder 'Typoscript Templates'. Where is this folder? I don't have it.
What does it mean when it says: The only thing the "Introduction Package" template does is to include the "ROOT" template that in turn includes other templates.?
Tnx so much
Andrea
The root level of your website is the page called Home. It also has the globe instead of a normal page icon, because the flag Use as root page is set in the page properties under behavior.
When you access a page in TYPO3 CMS, then it will walk up the rootline until it finds a root page with a template record. In this case, it is indeed a record called Introduction Package, but what is more important, is that this is a record of the type template.
OK, so far we have found a template for your request. Now TypoScript comes into play. On a normal request, the template engine will search for an object named page which is (usually) of the type PAGE. Thus the most simple template is:
page = PAGE
page.10 = TEXT
page.10.value = <h1>Hello World</h1>
Which just prints Hello World on your website.
What happens next depends on your template approach chosen (marker base, automaketemple+marker, templavoila, fluid, fedext, ...). That means that TYPO3 CMS does not just have one template approach (or one kind of template), but is extensible and very flexible, as you can combine them.
In the Introduction Package uses the automaketemplate+markers approach. This includes a ready HTML template, automatically creates blocks based on certain rules and then replaces those blocks with dynamic content.
OK, where do you find the configuration for this?
The actual template file is fileadmin/default/templates/introduction_package_site_structure_template.html.
The TypoScript configuration is in fileadmin/default/TypoScript. There you can find a file called setup.ts. It includes all other TypoScript files. There are various folders, e.g. menu for the menu definition, block for the dynamic blocks, etc.
The configuration of automaeketemplate is in Extension/AutomakeTemplate/setup.ts.
The sections defined with the help of automaketemplate are replaced in Page/setup.ts.
The full TypoScript defines a tree structure of objects with their configuration. You can view the full parsed template with either the Template Analyzer or the TypoScript Object Browser which you find in the template tools in the dropdown select box on top of the module.
The separation of the TypoScript into several files is done by the purpose of the configuration inside the files. This is meant for easy maintenance and not for easy learning. You can always use the Template Analyzer to see the full template that is generated out of the fragments and the TS Object Browser to see what kind of configuration tree this results in.
This might sound a bit difficult at first, especially compared to the primitive template systems of other products, however it gives you great possibilities that are yet easy to maintain, even if you do major updates.
It is great to see that people decide to use TYPO3. In my point of view the biggest difference to WordPress, Drupal...
is the strict separation between HTML and dynamic logic, witch can be TypoScript/userFunc or Fluid logic...
and even this makes TYPO3 so powerful. nothing against WordPress, Drupal... ect. but to use PHP in templates is especially for updates a dangerous thing to do.
I am always impressed whats possible with TYPO3. "I cant do it" is not valid for TYPO3. TYPO§ always has a way.
It is indeed a hard way through to learn all the corners of TYPO3 but it is worth.
Keep doing it and you will succeed
Ludwig
Great to hear you also wanna use TYPO3 as a CMS.
To understand the TYPO3 CMS better, i think you can better begin from scratch, meaning download the source + dummy package and install it on your server, or maby download a wamp package.
Currently I use Fluid to build my templates. For the part outside TYPO3 its much like Joomla, just create one or more HTML files, with some special markers.
The other parts, which are in TYPO3, may be some more difficult now, and it would take a lot of time to explain that here, so i'll refer to a tutorial made by Thomas Deuling:
http://thomas.deuling.org/2011/06/create-a-complete-typo3-website-by-using-the-fluid-template-engine/
You might wanna join the TYPO3 mailing list for italy, found at http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-ug-italy.
Furthermore, the TYPO3 website is filled with documentation, although sometimes out of date its still usefull. Also you might wanna take a look at the TYPO3 certified integrator program. There you can find all the basics to become a master at TYPO3.
Please feel welcome to the community, TYPO3 is inspiring people to share!
Kind regards,
Jeroen
Hi i wrote a little starter ts time ago.. maybe helps you
Remember in TYPO3 there are many ways to solve things!..
gl
Setup:
config {
baseURL = http://www.bla.com/
prefixLocalAnchors = all
meaningfulTempFilePrefix=1
doctype=xhtml_trans
htmlTag_langKey=de
remove_defaultJS=external
inlineStyle2TempFile=1
disablePrefixComment = 1
linkVars=L
sys_language_uid=0
language=en
locale_all = en_EN.UTF-8
xmlprologue = none
}
page = PAGE
page.typeNum = 0
page.bodyTag=<body>
page.10=TEMPLATE
page.10 {
template = FILE
template.file = fileadmin/templates/template.html
workOnSubpart = DOCUMENT
subparts {
CONTENT=COA
CONTENT.10<styles.content.get
}
}
File: template.html
<!-- ###DOCUMENT### -->
<!-- ###CONTENT### -->CONTENT<!-- ###CONTENT### -->
<!-- ###DOCUMENT### -->