Is it possible to get an entry title and URI from a segment? e.g. If segment 1 has a value of 'about', I'd want to output an entry title of 'About Us', and a URI of 'mysite.com/about', and so on for other segments.
I'm trying to code up a breadcrumb menu, and my site has a mixture of Singles, Structures and Channels.
I have the following _includes/nav_breadcrumb.html template, but I'm hard-coding everything at the moment (and only have it one level deep) so it's not going to be sustainable to keep this up-to-date on anything but the smallest of static sites, hence why I'm wondering about being able to pull in entry details via the segments. Thanks for any help with this.
<a href="{{ siteUrl }}">Home</a> » {% if craft.request.getSegment(1) == 'about' %} <a href="{{ siteUrl }}about">About</a> {% elseif craft.request.getSegment(1) == 'news' %} <a href="{{ siteUrl }}news">News</a> {% elseif craft.request.getSegment(1) == 'contact' %} <a href="{{ siteUrl }}contact">Contact</a> {% endif %}