[TYPO3-english] Conditions in GIFBUILDER
Jigal van Hemert
jigal.van.hemert at typo3.org
Tue Sep 3 12:38:03 CEST 2013
Hi,
On 3-9-2013 1:46, Nico Deblauwe wrote:
> For a graphical overview of all seminars on a site, I'm using the following
> code
> http://lists.typo3.org/pipermail/typo3-project-seminars/2011-August/003101.html
>
> Now I would like to add a label in the upper right corner. Important is
> that this label should only be shown if the seminar is of a certain
> category.
In the TS you see
10.file = GIFBUILDER
10.file {
below that all the parts of the image (the base image, coloured boxes,
text) are defined. In the TS documentation for GIFBUILDER [1] you see
that the numbered parts are of type "Gifbuilder object + .if". You can
add a .if property to each of the numbered part.
More about the syntax of if-conditions is available at [2].
Now your next challenge is to find out how categories are connected to
the seminars. All parts of 'if' support stdWrap so you can do everything
that is possible with TypoScript.
What's the name of the categories field in the database? Is it a
comma-separated list of category-IDs or is it connected using an mm-table?
Then you can construct a condition that checks for a specific category.
[1]
http://docs.typo3.org/typo3cms/TyposcriptReference/Gifbuilder/ObjectNames/Index.html
[2]
http://docs.typo3.org/typo3cms/TyposcriptReference/Functions/If/Index.html
--
Jigal van Hemert
TYPO3 CMS Active Contributor
TYPO3 .... inspiring people to share!
Get involved: typo3.org
More information about the TYPO3-english
mailing list