• 10-09-2024, 19:14:08
    #1
    Selam üstadlar, nasılsınız iyisiniz umarım, size sormak istediğim bir şey var, bana yardımcı olur musunuz ?

    Sorum şu;
    Localhost üzerinden Bir site ve admin paneli yapıyorum, dosya yapım şu şekilde
    localhost/web/
    localhost/web/admin
    Şimdi sidebar şurada localhost/web/admin/includes/sidebar.php

    Sorun şu
    Örneğin Localhost/web/admin/blog/blog_list.php içine girdiğim zaman sidebardan Ana Sayfaya tıklayınca Şu şekilde oluyor http://localhost/web/admin/blog/blog/dashboard.php Bir türlü şu sorunu çözemedim.

    // Menü öğelerini tanımlayan bir dizi oluşturun
    $menu_items = [
        [
            'icon' => 'fas fa-home',
            'text' => 'Theme Settings',
            'link' => '/homesettings.php'
        ],
        [
            'icon' => 'fas fa-bars',
            'text' => 'Blog',
            'submenu' => [
                [
                    'text' => 'Blog List',
                    'link' => 'blog/blog_list.php'
                ],
                [
                    'text' => 'Add Blog',
                    'link' => 'blog/add_blog.php'
                ]
            ]
        ],
        // Diğer menü öğeleri
        [
            'icon' => 'fas fa-thumbtack',
            'text' => 'Pinned Items',
            'link' => '../pinned_items.php'
        ],
        [
            'icon' => 'fas fa-heart',
            'text' => 'Following',
            'link' => '../following.php'
        ],
        [
            'icon' => 'fas fa-chart-line',
            'text' => 'Trending',
            'link' => '../trending.php'
        ],
        [
            'icon' => 'fas fa-fire',
            'text' => 'Challenges',
            'link' => '../challenges.php'
        ],
        [
            'icon' => 'fas fa-magic',
            'text' => 'Kategoriler',
            'link' => '../admin/blog/add_category.php'
        ],
        [
            'icon' => 'fas fa-gem',
            'text' => 'Blog',
            'link' => '../blog/edit.php'
        ],
        [
            'icon' => 'fas fa-cog',
            'text' => 'Ayarlar',
            'link' => '../ayarlar.php'
        ]
    ];
  • Kabul Edilen Cevap
    • $base_url = '/web/admin'; // Ana URL
      
      $menu_items = [
          [
              'icon' => 'fas fa-home',
              'text' => 'Theme Settings',
              'link' => $base_url . '/homesettings.php'
          ],
          [
              'icon' => 'fas fa-bars',
              'text' => 'Blog',
              'submenu' => [
                  [
                      'text' => 'Blog List',
                      'link' => $base_url . '/blog/blog_list.php'
                  ],
                  [
                      'text' => 'Add Blog',
                      'link' => $base_url . '/blog/add_blog.php'
                  ]
              ]
          ],
          [
              'icon' => 'fas fa-thumbtack',
              'text' => 'Pinned Items',
              'link' => $base_url . '/pinned_items.php'
          ],
          [
              'icon' => 'fas fa-heart',
              'text' => 'Following',
              'link' => $base_url . '/following.php'
          ],
          [
              'icon' => 'fas fa-chart-line',
              'text' => 'Trending',
              'link' => $base_url . '/trending.php'
          ],
          [
              'icon' => 'fas fa-fire',
              'text' => 'Challenges',
              'link' => $base_url . '/challenges.php'
          ],
          [
              'icon' => 'fas fa-magic',
              'text' => 'Kategoriler',
              'link' => $base_url . '/blog/add_category.php'
          ],
          [
              'icon' => 'fas fa-gem',
              'text' => 'Blog',
              'link' => $base_url . '/blog/edit.php'
          ],
          [
              'icon' => 'fas fa-cog',
              'text' => 'Ayarlar',
              'link' => $base_url . '/ayarlar.php'
          ]
      ];
  • 10-09-2024, 19:34:49
    #2
    Merhaba, örnek kullanım olarak URL adreslerinden birisini örn: /web/admin/pinned_items.php olacak şekilde düzenleyerek kontrol edebilir misiniz?
  • 10-09-2024, 19:58:02
    #3
    Bu cevap, konu sahibi tarafından kabul edilebilir bir cevap olarak işaretlendi.
    $base_url = '/web/admin'; // Ana URL
    
    $menu_items = [
        [
            'icon' => 'fas fa-home',
            'text' => 'Theme Settings',
            'link' => $base_url . '/homesettings.php'
        ],
        [
            'icon' => 'fas fa-bars',
            'text' => 'Blog',
            'submenu' => [
                [
                    'text' => 'Blog List',
                    'link' => $base_url . '/blog/blog_list.php'
                ],
                [
                    'text' => 'Add Blog',
                    'link' => $base_url . '/blog/add_blog.php'
                ]
            ]
        ],
        [
            'icon' => 'fas fa-thumbtack',
            'text' => 'Pinned Items',
            'link' => $base_url . '/pinned_items.php'
        ],
        [
            'icon' => 'fas fa-heart',
            'text' => 'Following',
            'link' => $base_url . '/following.php'
        ],
        [
            'icon' => 'fas fa-chart-line',
            'text' => 'Trending',
            'link' => $base_url . '/trending.php'
        ],
        [
            'icon' => 'fas fa-fire',
            'text' => 'Challenges',
            'link' => $base_url . '/challenges.php'
        ],
        [
            'icon' => 'fas fa-magic',
            'text' => 'Kategoriler',
            'link' => $base_url . '/blog/add_category.php'
        ],
        [
            'icon' => 'fas fa-gem',
            'text' => 'Blog',
            'link' => $base_url . '/blog/edit.php'
        ],
        [
            'icon' => 'fas fa-cog',
            'text' => 'Ayarlar',
            'link' => $base_url . '/ayarlar.php'
        ]
    ];
  • 10-09-2024, 20:10:04
    #4
    serudigital adlı üyeden alıntı: mesajı görüntüle
    Merhaba, örnek kullanım olarak URL adreslerinden birisini örn: /web/admin/pinned_items.php olacak şekilde düzenleyerek kontrol edebilir misiniz?
    Evet onu da yaptım bu sefer /web/admin/admin olarak web/admin/web/admin/pineed. diye deva mediyor
  • 10-09-2024, 20:11:12
    #5
    Ellerine sağlık hocam, İşe yaradı.