[TYPO3-content-rendering] [Typo3-dev] Less features, more future

JoH info at cybercraft.de
Fri Oct 14 12:40:18 CEST 2005


>> Well - this could be solved by simply adding an elementcounter on a
>> per page base.
>>
>> <div class="single_imagecontainer" id="tt_content_123_1_1">
>> <div class="single_imagecontainer" id="tt_content_124_1_2">
>> <div class="single_imagecontainer" id="tt_content_125_1_3">
>> <div class="single_imagecontainer" id="tt_content_125_2_4">
>> <div class="single_imagecontainer" id="tt_content_123_1_5">
>>
> How to assure this, when dealing with different content elments,
> different extensions maybe?

First case: Different content elements
Look at the above example.
You have 3 different content elements. One of them is used twice another one
contains two images.
Since we are using a counter for each element that is getting a dynamic id
this seems to be no problem.

Second case: different extensions
If the extension author wants to create dynamic CSS entries to the same
file, he simply has to use the same counter.
So we could get things like:

<div class="single_imagecontainer" id="tt_content_123_1_1">
<div class="news_singleView_imagecontainer" id="tt_news_456_1_2">
<div class="single_imagecontainer" id="tt_content_124_1_3">
<div class="myextension_whatever_imagecontainer"
id="myextension_whatever_789_1_4">
<div class="single_imagecontainer" id="tt_content_125_2_5">
<div class="single_imagecontainer" id="tt_content_123_1_6">

The only thing that has to be done is to provide this counter as a register
with autoincrement on a per page base.
To enable/disable this behaviour for elements, we could use a TypoScript
parameter like

dynamicCSS_entry = 1
dynamicCSS_entry.prefix = myprefix

This will trigger a function that increments the counter, gets the
tablename, some additional prefix and the uid.
Then it creates a string with some underlines and assigns this as the id of
the element.

Sounds not too complicated to me.

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.openbc.com/go/invuid/Jo_Hasenau





More information about the TYPO3-project-content-rendering mailing list