title: sitecore query items by client url
body: <p>I am looking for a quick and dirty way to query the layouts files of a particular page by its friendly url.  This is probably easy, but I can't find the solution.</p>
  
  <p>Basically I want to say something like the following.  Pseudo-code:</p>
  
  <pre><code>var mainpage = Sitecore.EasyQueryUtility.GetItemByFriendlyUrl(requestedUrl);
  </code></pre>
  
  <p>or </p>
  
  <pre><code>var mainpage = Sitecore.EasyQueryUtility.GetOppositeOfFriendlyUrl(friendlyurl);
  </code></pre>