I'm trying to get the content of a single using a slug from the url. I'm using the following code:
{% set item = craft.entries.slug(craft.request.getSegment(1)).first() %}
This doesn't work, returns null, if there is a dash in segment 1.
For example if I have the following url: http://craft.dev/this-is-a-segment/segment2 And in craftcms I have a single with title "This is a segment" and url "this-is-a-segment" I can't get the content of that single.
If I change the slug to camelcase it does work, but I was under the impression that slug and section handle were two different things...
Is this a bug or am I doing something wrong?