[TYPO3-shop] Describing page > include complete page
Lukas Stancik
webmaster at robe.cz
Thu Jan 22 14:33:09 CET 2009
Hi Maarten,
I'm not sure if you are still looking for the solution, but I think I
managed to get it working. This is what I have done:
TYPO3 ver. 4.1.7
tt_products 2.6.0
tt_news 2.5.2
htmlArea RTE 1.5.6
I have products descriptions and stuff [data-sheets, downloads etc.]
saved as a tt_news records so the solution is based on tt_news.
Basically what I do is "pluging" the tt_news content inside the
description field of tt_products with help of the htmlArea RTE editor.
This piece of Typoscript is what I have now in my setup on the page
where the products are stored:
(I found it in some developer's blog, but I can't remeber where. Anyway,
I'd like to praise that guy for this extremely usefull thing!!!)
----cut----
lib.parseFunc_RTE.tags {
content = CONTENT
content {
table = tt_news
# Replace XXX with UID of the page where the content elements are
select.pidInList = XXX
select.andWhere.current = 1
select.andWhere.wrap = title = '|'
# The "title" may be replaced with "uid" to be sure you will match
# the exact record you really want to
}
}
tt_content.stdWrap.prefixComment =
tt_content.html.prefixComment =
lib.parseFunc_RTE.externalBlocks = object,div,embed,param
# I think those last 3 lines are not necessary, not sure...
----cut----
I presume there is already tt_news template included in your setup to be
able to display news records. Also make sure you have the
###PRODUCT_NOTE### marker somewhere in your tt_products template.
Now the fun part. Let's imagine you have a news article entitled
"Product 1" stored at the page with XXX pid. Just place this text inside
the description field in of your product (htmlArea RTE must be running
of course):
<content>Product 1</content>
And you are there :D
BTW: the layout of the whole description part is now controlled through
tt_news template.
I hope it helped you a bit.
With Best Regards
Lukas Stancik
Maarten ten Brinke wrote:
> Hi all,
>
> I was wondering what the field 'Describing pages:' can do in the
> "Products" record. When I include there a page where I made a full
> description I have noticed that I can include this content in the
> template by markers as:
>
> ###PRODUCT_NOTE_UID_1_title###
> ###PRODUCT_NOTE_UID_1_1_TEXT_bodytext###
>
> On one hand this is very useful, because you can re-layout all content
> elements from this included page. But for me it would be better to be
> able to layout the page through normal content management (with
> different types of content), and include it as such in the single view
> of a product.
>
> I'm thinking of making a marker myself (PRODUCT_DESC_TEST) by code
> similar to this:
>
> plugin.tt_products.marks{
> PRODUCT_DESC_TEST = COA
> PRODUCT_DESC_TEST {
> 10 = TEXT
> 10.value = TEST TEST
> }
> }
>
> But I don't know how I could retrieve the pid value of the included page
> (of the active single product) and place it in the marker.
>
> I was wondering if there is already a marker that could do this? If not,
> could someone point me in the right direction for writing the code for
> creating a marker?
>
> Thanx,
>
> Maarten
More information about the TYPO3-project-tt-products
mailing list