Announcement

Collapse
No announcement yet.

Making a breadcrumb in PHP

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Nice script!

    Comment


    • #17
      Sugar, could you explain more?

      Miriam,
      PHP Code:
      $whole $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; 
      can be replaced with whatever you desire.
      PHP Code:
      $whole 'http://www.example.com/'.$page
      Where $page is the page you want from pages/... however that is obtained.

      Comment


      • #18
        Found this on Google, and looks very handy.

        Just a quick question; would it be appropriate to use this code for dynamic page titles?
        How could it be re-purposed?

        Would it be possible to alias a folder name so that if it was called 'folder-name' in the page title it could appear as 'Folder Name'?

        Thanks in advance.

        Comment


        • #19
          Hi erisco,

          I am new to php, and probably being a bit of a nunce, that said however, I had read through the comments and can't see what I would like to do. Following on from the modifications you made for platey by stripping the .php from the individual file names, is it possible to remove the link from the file if it is not index.php?

          To make it clearer, using your example:

          Home / Foo / Bar / file.php

          can you remove the link from file.php?

          Many thanks for a great script.

          Comment


          • #20
            Top script! One small bug in the tutorial, though - the "numbered placeholders in a template" example uses the following as a format string:

            <a href="%1s" onclick="return popup(\'%1s\')">%2s</a>

            This doesn't work (PHP emits an error message about "incorrect number of arguments to fprintf"). Having taken erisco's excellent advice and read the PHP documentation, I find the format string should be

            <a href="%1$s" onclick="return popup(\'%1$s\')">%2$s</a>

            (note the dollar sign prior to each 's' format character).

            Comment

            Working...
            X