[TYPO3-english] Making access status visible in the Frontend

Walrick lists at globalhealingcircle.net
Wed Apr 22 11:38:58 CEST 2009


I tried:

temp.Maincontent < styles.content.get
temp.Maincontent.renderObj.stdWrap.wrap = <div class="content-unit">|</div>
temp.Maincontent.renderObj.stdWrap.wrap2 = <div
class="membersonly"><p>MembersOnly</p></div>|
temp.Maincontent.renderObj.stdWrap.wrap2.if {
				value = -2,1
				isInList.field = fe_group
				}
temp.Maincontent.renderObj.stdWrap.wrap3 = <div
class="membersonly"><p>CT Only</p></div>|
temp.Maincontent.renderObj.stdWrap.wrap3.if {
				value = 2
				equals.field = fe_group
				}

This shows all the wraps fine. However the if statements do not work.
Not just the fe_group bit. But if I add change the statement top
something simple like
value = 1
equals = 1
it still doesn't work.

So I guess this is not the right syntax.
Can anyone help getting this right?

By the way I created this in such a way that the first wrap always shows
and the second only when the right conditions apply.

Regards,

Walrick


Walrick wrote:
> bernd wilke wrote:
>> two ideas:
>> 1. build an plugin-extension which is included on every page and which 
>> detects any Elements of tt_content for current page which are access-
>> restricted and return info about them.
>>
>> 2. change the std-wrap of tt_content-elements depending on values of 
>> access-field, using typoscript-if .
> 
> Hmm, programming a plugin is beyond my capabilities. I could ask someone
> else to try this, but I'd like to try a TS option first. Which brings me
> to your second idea.
> 
> Can you tell me how to go about this? I haven't worked with
> typoscript-if before, just with standard conditions
> 
> At the moment my content is inserted like this:
> CONTENT < styles.content.get
> CONTENT.renderObj.stdWrap.wrap = <div class="content-unit">|</div>
> 
> I asume the if statement should influence the second line. But what
> should the statement be and how to incorporate this with the wrap.
> 
> Looking at TSREF I would come up with something like the following if
> statement:
> 
> if {
> 	value = -2,1
> 	isInList.field=fe_group
> }
> 
> What I would need then is something which would result in the wrap being
> <div class="content-unit">|</div> by default,
> <div class="content-unit"><plussomemorecode>|</div> if fe_group = -2 or 1
> <div class="content-unit"><someothercode>|</div> if fe_group = 2
> 
> The latter is less important.
> 
> Or does the whole method to insert content need to be replaced bu
> something like:
>   1 = CONTENT
>   1.table = tt_content
>   1.select {
>     pidInList = this
>     orderBy = sorting
>   }
> With added code for the wrap and if clause?
> 
> Thanks for any help. At least I'm getting the feeling that my original
> wish should be possible. (Each content element marked as members-only if
> it is).
> 
> Regards,
> 
> Walrick
> 
> 


-- 
webmaster Global Healing Circle
www.globalhealingcircle.net


More information about the TYPO3-english mailing list