I feel like this is a silly question but I can't figure out the way to get just the slug for a node. Is there even a built in way to do this? Currently I am using the following which seems less than bulletproof:
If the case calls for it I might change the Replace call to a Regex Replace to catch more. The only other alternative I can think of is getting the node's URL, splitting on '/' and grabbing the last element.
Is there a way to get the just a node's slug in umbraco?
Getting a Node Slug
Hi community,
I feel like this is a silly question but I can't figure out the way to get just the slug for a node. Is there even a built in way to do this? Currently I am using the following which seems less than bulletproof:
If the case calls for it I might change the Replace call to a Regex Replace to catch more. The only other alternative I can think of is getting the node's URL, splitting on '/' and grabbing the last element.
Is there a way to get the just a node's slug in umbraco?
Use
That's exactly what I needed! For the life of me I couldn't find that method call. Thanks for the info!
is working on a reply...