Tuesday, March 27, 2018

Get Publish page url and title in sitefinity



SELECT sf_page_node.Title_,
  _url_parent =
    CASE WHEN (sf_page_node_2.url_name_ = N'Pages')   THEN '/'
              ELSE sf_page_node_2.url_name_ +'/'
    END,
  sf_page_node.url_name_ AS url_page
FROM
  sf_page_node LEFT OUTER JOIN
  sf_page_node AS sf_page_node_2
  ON sf_page_node.parent_id = sf_page_node_2.id
WHERE (sf_page_node.root_id =
    (
      SELECT id FROM sf_page_node AS sf_page_node_1 WHERE (nme = 'FrontendSiteMap')
     )
   ) AND
  (sf_page_node.show_in_navigation = 1) AND
  (sf_page_node.render_as_link = 1) AND
  (sf_page_node.node_type = 0) AND
  (sf_page_node.approval_workflow_state_ = N'Published')

No comments:

Post a Comment