Maalesef network ayarlarım uzak masaüstü programlarını kullanmaya müsait değil, aldığınız hatayı ya da daha fazla detayı paylaşırsanız buradan yardımcı olalım.
Merhaba,
Şimdi ben wisecp teması geliştiriyorum ve wisecp burayı bu şekilde kodlamış ben şu şekilde yapmak istiyorum;
Bu kodun orijinal hali şu şekilde;
<?php
footer_menu_walk($footer_menus,false);
function footer_menu_walk($list=[],$children=false,$opt=[]){
foreach ($list AS $menu){
echo (!$children) ? '<div class="footblok">' : '';
echo '<a';
echo (!$children) ? ' style="padding-left:0px;color:white;"' : '';
if($menu["link"]!=''){
echo ' href="'.$menu["link"].'"';
echo ($menu["target"]) ? ' target="_blank"' : '';
}
echo '>';
echo (!$children) ? EOL.'<h3 class="yazi">' : '';
echo (!empty($menu["icon"])) ? '<i class="'.$menu["icon"].'" aria-hidden="true"></i>' : '';
echo $menu["title"];
echo (!$children) ? '</h3>'.EOL : '';
echo '</a>'.EOL;
($menu["children"]) ? footer_menu_walk($menu["children"],true,$opt) : '';
echo (!$children) ? '</div>'.EOL : '';
}
}
?>Gelen veri $menu üzerinden geliyor $menu'yu var_dump'a döktüğümüz zaman;
array(13) {
["id"]=>
string(2) "15"
["parent"]=>
string(1) "0"
["type"]=>
string(6) "footer"
["icon"]=>
string(0) ""
["rank"]=>
string(1) "0"
["target"]=>
string(1) "0"
["status"]=>
string(6) "active"
["page"]=>
string(0) ""
["onlyCa"]=>
string(1) "0"
["title"]=>
string(20) "KULLANIŞLI LİNKLER"
["link"]=>
string(18) "javascript:void 0;"
["extra"]=>
array(0) {
}
["children"]=>
array(8) {
[41]=>
array(13) {
["id"]=>
string(2) "41"
["parent"]=>
string(2) "15"
["type"]=>
string(6) "footer"
["icon"]=>
NULL
["rank"]=>
string(1) "0"
["target"]=>
string(1) "0"
["status"]=>
string(6) "active"
["page"]=>
string(7) "contact"
["onlyCa"]=>
string(1) "0"
["title"]=>
string(13) "Bize Ulaşın"
["link"]=>
string(41) "https://wisecp.egemenhosting.com/iletisim"
["extra"]=>
array(0) {
}
["children"]=>
array(0) {
}
}
[87]=>
array(13) {
["id"]=>
string(2) "87"
["parent"]=>
string(2) "15"
["type"]=>
string(6) "footer"
["icon"]=>
NULL
["rank"]=>
string(1) "1"
["target"]=>
string(1) "0"
["status"]=>
string(6) "active"
["page"]=>
string(10) "references"
["onlyCa"]=>
string(1) "0"
["title"]=>
string(11) "Referanslar"
["link"]=>
string(44) "https://wisecp.egemenhosting.com/referanslar"
["extra"]=>
array(0) {
}
["children"]=>
array(0) {
}
}
[88]=>
array(13) {
["id"]=>
string(2) "88"
["parent"]=>
string(2) "15"
["type"]=>
string(6) "footer"
["icon"]=>
NULL
["rank"]=>
string(1) "2"
["target"]=>
string(1) "0"
["status"]=>
string(6) "active"
["page"]=>
string(4) "news"
["onlyCa"]=>
string(1) "0"
["title"]=>
string(18) "Haber ve Duyurular"
["link"]=>
string(41) "https://wisecp.egemenhosting.com/haberler"
["extra"]=>
array(0) {
}
["children"]=>
array(0) {
}
}
[89]=>
array(13) {
["id"]=>
string(2) "89"
["parent"]=>
string(2) "15"
["type"]=>
string(6) "footer"
["icon"]=>
NULL
["rank"]=>
string(1) "3"
["target"]=>
string(1) "0"
["status"]=>
string(6) "active"
["page"]=>
string(8) "articles"
["onlyCa"]=>
string(1) "0"
["title"]=>
string(17) "Blog'tan Yazılar"
["link"]=>
string(40) "https://wisecp.egemenhosting.com/yazilar"
["extra"]=>
array(0) {
}
["children"]=>
array(0) {
}
}
[42]=>
array(13) {
["id"]=>
string(2) "42"
["parent"]=>
string(2) "15"
["type"]=>
string(6) "footer"
["icon"]=>
NULL
["rank"]=>
string(1) "4"
["target"]=>
string(1) "0"
["status"]=>
string(6) "active"
["page"]=>
string(5) "kbase"
["onlyCa"]=>
string(1) "0"
["title"]=>
string(14) "Bilgi Bankası"
["link"]=>
string(46) "https://wisecp.egemenhosting.com/bilgi-bankasi"
["extra"]=>
array(0) {
}
["children"]=>
array(0) {
}
}
[90]=>
array(13) {
["id"]=>
string(2) "90"
["parent"]=>
string(2) "15"
["type"]=>
string(6) "footer"
["icon"]=>
NULL
["rank"]=>
string(1) "5"
["target"]=>
string(1) "0"
["status"]=>
string(6) "active"
["page"]=>
string(7) "license"
["onlyCa"]=>
string(1) "0"
["title"]=>
string(17) "Lisans Doğrulama"
["link"]=>
string(47) "https://wisecp.egemenhosting.com/lisans-dogrula"
["extra"]=>
array(0) {
}
["children"]=>
array(0) {
}
}
[40]=>
array(13) {
["id"]=>
string(2) "40"
["parent"]=>
string(2) "15"
["type"]=>
string(6) "footer"
["icon"]=>
NULL
["rank"]=>
string(1) "6"
["target"]=>
string(1) "0"
["status"]=>
string(6) "active"
["page"]=>
string(9) "contract2"
["onlyCa"]=>
string(1) "0"
["title"]=>
string(21) "Gizlilik Sözleşmesi"
["link"]=>
string(77) "https://wisecp.egemenhosting.com/kisisel-veriler-ve-genel-gizlilik-sozlesmesi"
["extra"]=>
array(0) {
}
["children"]=>
array(0) {
}
}
[39]=>
array(13) {
["id"]=>
string(2) "39"
["parent"]=>
string(2) "15"
["type"]=>
string(6) "footer"
["icon"]=>
NULL
["rank"]=>
string(1) "7"
["target"]=>
string(1) "0"
["status"]=>
string(6) "active"
["page"]=>
string(9) "contract1"
["onlyCa"]=>
string(1) "0"
["title"]=>
string(19) "Hizmet Sözleşmesi"
["link"]=>
string(62) "https://wisecp.egemenhosting.com/hizmet-ve-kullanim-sozlesmesi"
["extra"]=>
array(0) {
}
["children"]=>
array(0) {
}
}
}
}Şimdi burada bulunan en üstteki KULLANIŞLI LİNKLER ana başlık, altında bulunanlar ise ana başlığın çocukları yani böyle;
Ben bunları şu şekilde ekrana yazdırmak istiyorum;
<div class="col">
<div class="primary-btn">KULLANIŞLI LİNKLER</div>
<u>
<li><a href="#">Bize Ulaşın</a></li>
<li><a href="#">Referanslar</a></li>
<li><a href="#">Haber ve Duyurular</a></li>
<li><a href="#">Blog'tan Yazılar</a></li>
<li><a href="#">Bilgi Bankası</a></li>
..
..
..
</u>
</div>
Şeklinde ama bunu bir türlü başaramıyorum. Umarım anlatabilmişimdir umarım yardımcı olabilirsiniz.