Reputation: 1364
Is there a way to insert a content element or the contents of a column into the menu?
I want the menu dropdown to contain it's sub-pages, as normal, but also have a featured area that can be edited on occasion.
Eg. the menu Item 'Fruit' will list sub pages "Apple, Banana, Orange" but then after those have a featured picture like say a Banana with a bit of info under it. Then next month edit the feature to be an Apple.
If it was only a picture I could use the page resources tab, but I require some text as well...
Upvotes: 2
Views: 171
Reputation: 5850
In your TypoScript setup, use an appropriate stdWrap
-enabled property. There are stdWrap
, stdWrap2
and many other properties that have stdWrap
enabled. On those, you can use cObject
, preCObject
, postCObject
and probably some more to insert arbitrary TypoScript content objects, including a CONTENT
object to fetch the content. If you want to fetch the content element with ID 42
located on page with ID 276
, the CONTENT
object would look like this (x being the property of stdWrap that takes a cObject, e.g. stdWrap.preCObject
):
x = CONTENT
x {
table = tt_content
select {
uidInList = 42
pidInList = 276
languageField = sys_language_uid
}
renderObj {
// Insert rendering definition for the content object here,
// or leave the entire property renderObj out if you want the
// global rendering definition
}
}
Upvotes: 3