Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nathan 67 posts 146 karma points
    Mar 10, 2017 @ 08:06
    Nathan
    0

    SQL query: Get document uniqueId by URL

    Hi,

    I need a SQL query to get the uniqueId of a page within the BO content tree by its URL.

    Have looked into the database and have not found where the page URLs are stored.

    Something like:

    select uniqueId, url from documentTable left join table2 on documentTable.url = table2.url

    Thanks

  • Dennis Adolfi 1082 posts 6450 karma points MVP 6x c-trib
    Mar 11, 2017 @ 08:43
    Dennis Adolfi
    0

    Hi Dan.

    Unfortunately I don't think this is possible. URLs are not stored in any database table, because they are set programmatically using UrlService's and ContentFinder's. https://our.umbraco.org/documentation/reference/routing/request-pipeline/icontentfinder

    Instead of working with SQL queries, maybe you should have a look at the UmbracoHelper methods and programmatically generate some sort of report, if that's what you are looking on achieving? https://our.umbraco.org/documentation/reference/querying/umbracohelper/

    Best of luck!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies