# $GLOBALS["TSFE"]->set_no_cache(); $highObj= new user_typo3wizard; $ts= $this->getCurrentVal(); $content="
".$ts.""; $content=$highObj->highlightTS($ts); /* $filename = 'test.txt'; $somecontent =$ts; if($_GET["jaja"]==1) { $filename="/var/www/web1/html/wtest/".$GLOBALS['TSFE']->id; //$GLOBALS['TSFE']->page['title']; // Let's make sure the file exists and is writable first. //if (is_writable($filename)) { // In our example we're opening $filename in append mode. // The file pointer is at the bottom of the file hence // that's where $somecontent will go when we fwrite() it. if ( !file_exists($filename)){ touch ($filename); } if (!$handle = fopen($filename, 'a')) { //echo "Cannot open file ($filename)"; exit; } // Write $somecontent to our opened file. if (fwrite($handle, $somecontent) === FALSE) { //echo "Cannot write to file ($filename)"; exit; } //echo "Success, wrote ($somecontent) to file ($filename)"; fclose($handle); //} else { //echo "The file $filename is not writable"; //}} }*/ ?>


This snippet creates a menu where every menuitem on the 1.level has a own id. Using this id you can format the submenu with css selectors.
In this example a nested unordered list is created where to every mainmenupoint the css id menuitemUID is addet. UID is here the unique ID of the page.




phy
(don't you wish wrapItemAndSub had stdWrap properties too!)
I tried above code snippet but not working.
In HTML it shows {field:uid} and not actual uid.
I have latest Typo3 4.4 version.
Please help me.
Let's try this:
lib.menu = HMENU
lib.menu {
1 = TMENU
1 {
noBlur = 1
wrap = <ul id="menu">|</ul>
NO {
before.cObject = HTML
before.cObject {
value {
dataWrap = <li id="{field:uid}">|
}
}
wrapItemAndSub = |</li>
}
}
}
Add comment