質問

Here is what i have (simplified of course):

my.property = 15
...
page {
    page.someproperty < my.property
}

There are two conditions:

  • I can not rename my.property
  • I have to reference it inside the braces of page

Though my example is not working (verification appreciated), I guess everybody gets the point.

This is a very simple setup and I can not get why nobody in this whole internet ever had that issue.

Well... I guess I'm missing the question mark here.. so here is the actual question: Can anybody give me a working example that meets the above two conditions?

役に立ちましたか?

解決

my.property is not a valid property. First of all you must prefix a property with either lib or temp. The first one is a "Library" object and will be cached while the second one is a "Temporary" object and will be deleted after runtime.

Besides that, your example doesn't include any TypoScript objects. So even if it works, it won't output anything.

So this should work:

lib.myproperty = TEXT
lib.myproperty.value = Hello world!

page = PAGE
page {
  # PAGE is a COA so we need a numerical index
  10 < lib.myproperty
}

Output in browser:

Hello world!
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top