[TYPO3] creating tmenu/hmenu from alias of TYPO3 pages

Christopher Torgalson bedlamhotel at gmail.com
Sun Jan 20 14:52:06 CET 2008


Hi,

On Jan 20, 2008 2:15 PM, Darko Jr. Gonzalez <jkokino at gmail.com> wrote:
> >> That's exactly what I was thinking - not only that but its quite
> >> limited as a field. I did something very similar here:
> >> http://www.bindmans.com/index.php?id=92
> >>
> >> The team listing is a big TS generated menu really, and I'm grabbing
> >> some things from other fields along the way (photos, headlines to team
> >> members, position status, etc) and then displaying them as I
> >> want/need.
> >>
> >>Would it be possible for you to post your TS code to do this ?
> >>It would be interestning for me and others to see _HOW_ you grab
> >>"some things from other fields" etc.
> Tyler, thanks for the hint. Along with Chris. It is really limited.
> And yes, posting abit of your code would be helpful, what do you think?
>
> >And is the .php?id=whatevername  done with realURL ? (so that
> >whatevername translates to a page).
>
> myicq, he uses the alias field for this purpose I think.



Simple TS example--generates a set of links where, if there is content
in the description field of the page record, that content is shown
after the initial link with a "•" between them. Not commented, but as
self-explanatory as TS ever is :-)


lib.info_menu = HMENU
lib.info_menu {
	1 = TMENU
	1 {
		wrap = <ul>|</ul>
		noBlur = 1

		NO {
			wrapItemAndSub = <li>|</li>

			after.cObject = HTML
			after.cObject {
				value {
					data = field:description
					typolink {
						parameter.data = field:uid
						wrap = &nbsp;&middot;&nbsp;
					}

					if {
						isTrue.data = field:description
					}
				}
			}	
		}

		ACT = 1
		ACT < .NO
		ACT {
			ATagParams = clas="active"
		}
	}
	
	2 < .1
	3 < .1
}



-- 
Christopher Torgalson
http://www.typo3apprentice.com/


More information about the TYPO3-english mailing list