Comments 6
был бы очень признателен если была бы ссылка «как получилось».
0
Что касается ID и других аттрибутов, то я всегда делаю их из самой ссылки элемента меню. Так проще и не нужны никакие дополнительные модули.
> ereg_replace(«node/», "", $nid[0]);
> ereg('/business',$link)
Никогда, никогда и ещё раз НИКОГДА так не делайте!
1) «preg_replace(), which uses a Perl-compatible regular expression syntax, is often a faster alternative to ereg_replace().» © php.net/ereg_replace
2) «If you don't need fancy replacing rules (like regular expressions), you should always use this function instead of ereg_replace() or preg_replace().» © php.net/str_replace
3) «preg_match(), which uses a Perl-compatible regular expression syntax, is often a faster alternative to ereg(). » © php.net/ereg
4) «Do not use preg_match() if you only want to check if one string is contained in another string. Use strpos() or strstr() instead as they will be faster.» © php.net/preg_match
> ereg_replace(«node/», "", $nid[0]);
> ereg('/business',$link)
Никогда, никогда и ещё раз НИКОГДА так не делайте!
1) «preg_replace(), which uses a Perl-compatible regular expression syntax, is often a faster alternative to ereg_replace().» © php.net/ereg_replace
2) «If you don't need fancy replacing rules (like regular expressions), you should always use this function instead of ereg_replace() or preg_replace().» © php.net/str_replace
3) «preg_match(), which uses a Perl-compatible regular expression syntax, is often a faster alternative to ereg(). » © php.net/ereg
4) «Do not use preg_match() if you only want to check if one string is contained in another string. Use strpos() or strstr() instead as they will be faster.» © php.net/preg_match
+1
me сдерживает рвотные позывы :)
Как получить ноду — menu_get_object('node'), на крайняк айдишку из урла — arg(1), но точно уж не регекспы.
Как получить ноду — menu_get_object('node'), на крайняк айдишку из урла — arg(1), но точно уж не регекспы.
+1
Вот еще полезная штука
drupal.org/project/menu_attributes
drupal.org/project/menu_attributes
0
Sign up to leave a comment.
Танцы с бубном, часть 2 — tabbed menu в Drupal