Results 1 to 2 of 2

Thread: Printing page name and directory automatically

  1. #1
    Join Date
    Oct 2007
    Posts
    103

    Printing page name and directory automatically

    Hi,
    I am trying to automatically show the name of the page and its directory. For example,

    If there is a home page it would show

    Home

    For a page directly linked from the home page it would show:

    Home>Subpage1

    For a page linked from Subpage 1,

    Home>Subpage1>Subpage1-1

    I would like this to print automatically depending on the name of the page. Is there a way to automatically do this? Does it matter if the subpages are in separate folders-if so how does it change (Lets say subpage 1 and all pages under it are in a folder called subpage1)? And is the file name or page title used in the code?

  2. #2
    Join Date
    Jun 2008
    Location
    cardiff
    Posts
    77
    there are php commands to get the directory you are curently in and to get the file name (it might be the same command i cant remember) but it will give you

    http://www.mysite.com/index.html

    so you will need to do some string minipulation to split it by / symbol then for each folder say its called gallery you could tkae the 3rd element in the array and get gallery then add the > symbol then the page name. Its a lot of work and would be eaiser to hard code it but i supose it depends how many pages it has
    www.uk-site-design.co.uk stylish website development by Mke Dodd from £49.99

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •