Forum Moderators: coopster
I am looking for a breadcrumbs script that will do a few things, and wonderin' if someone had a good one lying around.
Here goes....
It needs to pull from the location bar and parse the url, BUT I would like to use a hidden form in my individual pages to write the title (instead of using the normal <title> tag)
I would prefer to do it with php (will it be spiderable then?) but I am very weak at scripting. I would also like to call the script from an external location if possible.
I am pretty in the dark here, so any help would be appreciated.
I love the usability (and potential spiderability) of breadcrumbs, but for a non-programmer, they have proved to be quite a pain in the butt (at least for me to customize to fit my application.)
Thanks in advance.
The navigation structure at the top of a webpage telling you where you are on the site.....
Home/ForumsIndex/TheWebmasterworld/etc/etc/ Title Goes Here
This is giving me fits today.
I guess javascript would probably be easier since I would have to change all my page extensions to .php but ideas on this would be greatly appreciated.
it should be possible to use the document.location object for this to get the querystring and document.title should do the trick for the page title.
with document.write you can place it on top of each page, but every page has to be changed for this, too (like with php) but there is no need to migrate to php at all.
mabe this is then something for the javascript forum here ;).
While I was trying to figure that out, I thought it might be better to do in php since then the links might be spiderable by google (would they?) and the linktext would count as well.
I am using hiddenform.pagetitle.value
to pull the value I put in the hiddenform field named "pagetitle". This was the only element I could think of to pull from so I could name my breadcrumb differently than the actual <title> (since the <title> is very long and SE optimized).
I'm kinda just searchin' for that peak cross between form (usability) and function (search engine friendliness)
I will probably go for the .js on this project, but does anyone have a good idea of what the code would be like for PHP? I think it would be great to know for future projects, and a good piece of code that could be recycled.
One last question.....can php scripts be run as externally linked files like javascripts? Bigtime Noob here.
I thought it might be better to do in php since then the links might be spiderable by google (would they?)
can php scripts be run as externally linked files like javascripts?
-hakre
The trouble with using Javascript is that search engines like those breadcrumb trails. Regular html code is a lot more practical - unless it's just there for visitors and you don't want it picked up for some reason.
The problem is....I have no idea where to start....I don't know squat about PHP (although it is running on our in- house linux/apache server). The only thing I have ever done in php is a small form script.
Does anyone have any good starting points/ tutorials that would get me movin' in the right direction?
As much as I would LOVE to learn PHP, I know the learning curve is high, and I really don't have the time. Just need to hack out a script that I can recycle throughout different sites.
Note that this script works by looking at the file name and path in order to display the navigation (much the same way as dmoz does).
So if your page was www.domain.com/green_widgets/fluffy-green-widgets.php you can get the script to display something like this:
Home>> Green Widgets>> Fluffy Green Widgets
Although this might be difficult with existing sites, I found this kind of structure when building a site is good anyway.
i recently had to do the same for our site and had a lot of help from the following tutorials:
[hotwired.lycos.com...]
[digi-fx.net...]
[zend.com...]
i know grahamstewart wrote a script for doing this as well in the php bag of tricks on this site [webmasterworld.com...]
good luck