TYPO3Jack.net - Das TYPO3 Mailinglist Forum Archiv

TYPO3 Mailingliste: nicht fragen - lesen!

TYPO3 Mailingliste: nicht fragen - lesen!_RR_1-->
Zurück   TYPO3Jack.net - Das TYPO3 Mailinglist Forum Archiv > TYPO3-Mailinglists: ENGLISH > typo3-english@lists.netfielders.de

Registrieren Hilfe Benutzerliste Kalender Suchen Heutige Beiträge Alle Foren als gelesen markieren
  #1  
Alt 08.10.2007, 19:35
Peter
Gast
 
Beiträge: n/a
Standard [TYPO3] Can't have different NOs with different types/heights inGMENU?

I have a GMENU that works with conditions that work. But I need to do
different sized NO types based on the condition

NO {
XY = ????
10 = TEXT
10.text.field = title
10.if {...}
20 = IMAGE
20 {
file.import = a/nother/file
file.maxW = 150
}
20.if {...}
}

Either 10 or 20 will be selected, never both. The conditions work,
selecting the right item (TEXT or IMAGE). Problem is, I don't know in
advance which it's going to be.

There is no set pattern or sequence so optionsplit is ruled out.

So, how do I determine what NO.XY should be? I can't use [10.h] or
[20.h] as I don't know in advance which wil be used!

Peter.
_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #2  
Alt 09.10.2007, 08:51
Mathias Schreiber [TYPO3]
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] Can't have different NOs with different types/heightsin GMENU?

Peter schrieb:
> I have a GMENU that works with conditions that work. But I need to do
> different sized NO types based on the condition
>
> NO {
> XY = ????
> 10 = TEXT
> 10.text.field = title
> 10.if {...}
> 20 = IMAGE
> 20 {
> file.import = a/nother/file
> file.maxW = 150
> }
> 20.if {...}
> }
>
> Either 10 or 20 will be selected, never both. The conditions work,
> selecting the right item (TEXT or IMAGE). Problem is, I don't know in
> advance which it's going to be.
>
> There is no set pattern or sequence so optionsplit is ruled out.
>
> So, how do I determine what NO.XY should be? I can't use [10.h] or
> [20.h] as I don't know in advance which wil be used!


XY = [10.h]+[20.h]+5

as an example....

--
T3A AM
Rocking TYPO3 since 3.1b1
_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #3  
Alt 09.10.2007, 11:04
Peter
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] Can't have different NOs with different types/heightsin GMENU?

Mathias Schreiber [TYPO3] wrote:
> Peter schrieb:
>> I have a GMENU that works with conditions that work. But I need to do
>> different sized NO types based on the condition
>>
>> NO {
>> XY = ????
>> 10 = TEXT
>> 10.text.field = title
>> 10.if {...}
>> 20 = IMAGE
>> 20 {
>> file.import = a/nother/file
>> file.maxW = 150
>> }
>> 20.if {...}
>> }
>>
>> Either 10 or 20 will be selected, never both. The conditions work,
>> selecting the right item (TEXT or IMAGE). Problem is, I don't know in
>> advance which it's going to be.
>>
>> There is no set pattern or sequence so optionsplit is ruled out.
>>
>> So, how do I determine what NO.XY should be? I can't use [10.h] or
>> [20.h] as I don't know in advance which wil be used!

>
> XY = [10.h]+[20.h]+5
>
> as an example....
>


Mi Mathias,

Thanks for the suggestion.

This definitely works in some circumstances. However, as it turns out
I'm producing a GMENU with useLargestItemX, which is taken from both 10
and 20 regardless of the conditions....

I'm going to completely re-address how the menu is generated, as I doubt
I'm going to get what I want this way....

Peter.
_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #4  
Alt 11.10.2007, 10:18
Peter
Gast
 
Beiträge: n/a
Standard [TYPO3] HELP! Losing hair. Was: Can't have different NOs withdifferent types/heights in GMENU?

Ok, this is driving me nuts. I can't believe there isn't a way to do
this, and I can't believe no-one has tried to do this before.

Forgetting all the code examples, the requirement is simple; I want
different types of entries of different sizes with different wraps in
the same GMENU based on a condition (the target page ID, for example).

So, based on the target PID, the GMENU entry will either be an IMAGE
object 50x50 with a specific wrap, or it will be a TEXT object 200x50
with a different wrap.

I can't use IProcFunc or ItemArrayProcFunc as both are already in use
for something else.

Any ideas?

Peter.
_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #5  
Alt 11.10.2007, 12:58
JoH
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] HELP! Losing hair. Was: Can't have different NOs withdifferent types/heights in GMENU?

> Ok, this is driving me nuts. I can't believe there isn't a way to do
> this, and I can't believe no-one has tried to do this before.
>
> Forgetting all the code examples, the requirement is simple; I want
> different types of entries of different sizes with different wraps in
> the same GMENU based on a condition (the target page ID, for example).
>
> So, based on the target PID, the GMENU entry will either be an IMAGE
> object 50x50 with a specific wrap, or it will be a TEXT object 200x50
> with a different wrap.
>
> I can't use IProcFunc or ItemArrayProcFunc as both are already in use
> for something else.


Doesn't sound like a big problem to me, since GMENU items have got two
options to remove the default rendering completely, one is altImgResource
the other one is allStdWrap.

With altImgResource you could use the import feature to get different images
depending on a condition:

NO {
altImgResource {
import.cObject = COA
import.cObject {
10 = IMG_RESOURCE
10 {
file = GIFBUILDER
file {
#blah
}
stdWrap.if {
value = 1,2,3,4,5
isInList.field = uid
}
}
20 = IMG_RESOURCE
20 {
file = GIFBUILDER
file {
#blah
}
stdWrap.if {
value = 1,2,3,4,5
isInList.field = uid
negate = 1
}
}
}
}
}

With allStdWrap you can use the COA directly but then you will loose the
options of having imgParams, ATagParams and other stuff that is available
for GMENU items and you will have to do the linking by yourself.

NO {
allStdWrap.cObject = COA
allStdWrap.cObject {
10 = IMG_RESOURCE
10 {
file = GIFBUILDER
file {
#blah
}
stdWrap.if {
value = 1,2,3,4,5
isInList.field = uid
}
}
20 = IMG_RESOURCE
20 {
file = GIFBUILDER
file {
#blah
}
stdWrap.if {
value = 1,2,3,4,5
isInList.field = uid
negate = 1
}
}
}
stdWrap.typolink.parameter.field = uid
}

Both of the approaches can handle optionSplit with any value inside the
NO-section, so you can still change the behaviour based on the position of
each item.

HTH - not tested though

Joey


_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #6  
Alt 11.10.2007, 13:10
JoH
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] HELP! Losing hair. Was: Can't have different NOs withdifferent types/heights in GMENU?

> With allStdWrap you can use the COA directly but then you will loose
> the options of having imgParams, ATagParams and other stuff that is
> available for GMENU items and you will have to do the linking by
> yourself.
> NO {
> allStdWrap.cObject = COA
> allStdWrap.cObject {
> 10 = IMG_RESOURCE
>
> HTH - not tested though


And of course not correct ;-)

since allStdWrap is no imgResource you have to use IMAGE instead:

NO {
allStdWrap.cObject = COA
allStdWrap.cObject {
10 = IMAGE
# ....

HTH

Joey


_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #7  
Alt 21.10.2007, 10:46
Peter
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] HELP! Losing hair. Was: Can't have different NOs withdifferent types/heights in GMENU?

Sorry for taking so long to try this - I'm mid house move and have only
just had the chance to try this out.

Thanks, Joey, for the pointers. They've allowed me to play with the menu
in various different ways. However, my frustration remains.

I get various good results with both methods, but each has at least one
show-stopper style problem.

If I use the first method, I can't change allWrap based on the condition.

If I use the second method, useLargestItemX fails to work and the menu
looks a mess (there are possibly other things that break but I spent so
long trying to find a way to fix the broken useLargestItemX that I
didn't find out what they might be...!).

Other suggestions welcome! In the meantime I'm going to experiment with
the first method (as this had the best results) looking for a way to
eliminate the allWrap.

Peter.

JoH wrote:
>> Ok, this is driving me nuts. I can't believe there isn't a way to do
>> this, and I can't believe no-one has tried to do this before.
>>
>> Forgetting all the code examples, the requirement is simple; I want
>> different types of entries of different sizes with different wraps in
>> the same GMENU based on a condition (the target page ID, for example).
>>
>> So, based on the target PID, the GMENU entry will either be an IMAGE
>> object 50x50 with a specific wrap, or it will be a TEXT object 200x50
>> with a different wrap.
>>
>> I can't use IProcFunc or ItemArrayProcFunc as both are already in use
>> for something else.

>
> Doesn't sound like a big problem to me, since GMENU items have got two
> options to remove the default rendering completely, one is altImgResource
> the other one is allStdWrap.
>
> With altImgResource you could use the import feature to get different images
> depending on a condition:
>
> NO {
> altImgResource {
> import.cObject = COA
> import.cObject {
> 10 = IMG_RESOURCE
> 10 {
> file = GIFBUILDER
> file {
> #blah
> }
> stdWrap.if {
> value = 1,2,3,4,5
> isInList.field = uid
> }
> }
> 20 = IMG_RESOURCE
> 20 {
> file = GIFBUILDER
> file {
> #blah
> }
> stdWrap.if {
> value = 1,2,3,4,5
> isInList.field = uid
> negate = 1
> }
> }
> }
> }
> }
>
> With allStdWrap you can use the COA directly but then you will loose the
> options of having imgParams, ATagParams and other stuff that is available
> for GMENU items and you will have to do the linking by yourself.
>
> NO {
> allStdWrap.cObject = COA
> allStdWrap.cObject {
> 10 = IMG_RESOURCE
> 10 {
> file = GIFBUILDER
> file {
> #blah
> }
> stdWrap.if {
> value = 1,2,3,4,5
> isInList.field = uid
> }
> }
> 20 = IMG_RESOURCE
> 20 {
> file = GIFBUILDER
> file {
> #blah
> }
> stdWrap.if {
> value = 1,2,3,4,5
> isInList.field = uid
> negate = 1
> }
> }
> }
> stdWrap.typolink.parameter.field = uid
> }
>
> Both of the approaches can handle optionSplit with any value inside the
> NO-section, so you can still change the behaviour based on the position of
> each item.
>
> HTH - not tested though
>
> Joey
>
>

_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #8  
Alt 22.10.2007, 04:38
JoH asenau
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] HELP! Losing hair. Was: Can't have different NOs withdifferent types/heights in GMENU?

>> With altImgResource you could use the import feature to get
>> different images depending on a condition:
>>
>> NO {
>> altImgResource {
>> import.cObject = COA
>> import.cObject {
>> 10 = IMG_RESOURCE
>> 10 {
>> file = GIFBUILDER
>> file {
>> #blah
>> }
>> stdWrap.if {
>> value = 1,2,3,4,5
>> isInList.field = uid
>> }
>> }
>> 20 = IMG_RESOURCE
>> 20 {
>> file = GIFBUILDER
>> file {
>> #blah
>> }
>> stdWrap.if {
>> value = 1,2,3,4,5
>> isInList.field = uid
>> negate = 1
>> }
>> }
>> }
>> }
>> }
>>

>
> If I use the first method, I can't change allWrap based on the
> condition.


Of course you can, because allWrap got stdWrap properties itself, so you can
create the wrap using a cObject:

allWrap.cObject = COA
allWrap.cObject {
10 = TEXT
10.value = wrapA | wrapA
10.if {
value = 1,2,3,4,5
isInList.field = uid
}
20 = TEXT
20.value = wrapB | wrapB
20.if {
value = 1,2,3,4,5
isInList.field = uid
negate = 1
}
}

and to do it in a more elegant way you could use a register that you can
check within both the GIFBUILDER and the allWrap:

NO {
altImgResource {
import.cObject = COA
import.cObject {
5 = LOAD_REGISTER
5 {
myCondition.cObject = TEXT
myCondition.cObject {
value = 0
override = 1
override.if {
value = 1,2,3,4,5
isInList.field = uid
}
}
}
10 = IMG_RESOURCE
10 {
file = GIFBUILDER
file {
#blah
}
stdWrap.if {
isTrue.data = register:myCondition
}
}
20 = IMG_RESOURCE
20 {
file = GIFBUILDER
file {
#blah
}
stdWrap.if {

isFalse = register:myCondition
}
}
}
}
allWrap.cObject = COA
allWrap.cObject {
10 = TEXT
10.value = wrapA | wrapA
10.if {
isTrue.data = register:myCondition
}
20 = TEXT
20.value = wrapB | wrapB
20.if {
isFalse.data = register:myCondition
}
}
}

HTH

Joey

--
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
openBC/Xing: http://www.cybercraft.de
T3 cookbook: http://www.typo3experts.com


_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #9  
Alt 11.12.2007, 11:17
Peter
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] HELP! Losing hair. Was: Can't have different NOs withdifferent types/heights in GMENU?

Well as usual real life intervened in tech life in the shape of moving
house and real work, so it's taken me a while to get around to this, but...

After much wrangling I realised that I was just not going to get it to
work the way I wanted - various TS options that I was using (perhaps
inappropriately) to produce a prety round-cornered popup menu fell
somewhere in-between the two methods so I shuffled a whole load of stuff
out of TS and into CSS and ended up with (note that this is a cut-down
version - the meat of the problem - with bogus libs/fields/values for
readability).....

lib.mainNav.2 {
itemArrayProcFunc = mylib->myfunc
IProcFunc = mylib->myfunc2
NO = 1
NO {
XY = [10.w]+30,25 |*| [10.w]+30,20 |*| [10.w]+30,25
ATagTitle.field = subtitle // title
ATagBeforeWrap = 1
allWrap.cObject = COA
allWrap.cObject {
10 = TEXT
10.value = <span class="subNavItem"> | </span>
10.if {
value.field = myfield
equals = myvalue
negate = 1
}
20 = TEXT
20.value = <span class="subNavImage"> | </span>
20.if {
value.field = myfield
equals = myvalue
}
}
10 = TEXT
10 {
text.field = title
}
altImgResource {
import.cObject = COA
import.cObject {
10 = IMG_RESOURCE
10 {
file = GIFBUILDER
file {
XY = 210,210
10 = IMAGE
10.file {
import.field = myimage
maxW = 200
maxH = 200
}
10.align = c,c
}
stdWrap.if {
value.field = myfield
equals = myvalue
}
}
}
}
}
}

which is pretty much what Joey suggested - thanks Joey!
_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
 

Lesezeichen

Themen-Optionen
Ansicht Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an


Ähnliche Themen

Thema Autor Forum Antworten Letzter Beitrag
[TYPO3] Extension for handling different types of one file fordownload jirka sedláèek typo3-english@lists.netfielders.de 0 04.09.2007 13:30
[TYPO3-dev] non-standard page types and extension configurationinfo? Jason Lefkowitz typo3-dev@lists.netfielders.de 6 07.06.2007 18:47
[TYPO3] Default content types James Corell typo3-english@lists.netfielders.de 5 06.06.2007 23:49
[TYPO3] Disabling content types James Corell typo3-english@lists.netfielders.de 4 23.05.2007 21:22
[TYPO3] hide non-editable content types in BE Steven Hewett typo3-english@lists.netfielders.de 2 16.04.2007 17:05


Alle Zeitangaben in WEZ +1. Es ist jetzt 07:27 Uhr.


Powered by vBulletin® Version 3.7.4 (Deutsch)
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Template-Modifikationen durch TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75