fnPageAndTemplatePartsList

Return

Return Type
table

Parameters

Parameter Parameter Type Mode Description
@PageID int IN

Definition

Copy



  CREATE function [dbo].[fnPageAndTemplatePartsList](@PageID int)
  RETURNS TABLE AS

  RETURN (
  SELECT
  scnt.ContentTypesID
  from
  dbo.SitePages spgs
  inner join dbo.PageContent pgct ON spgs.ID=pgct.SitePagesID
  inner join dbo.SiteContent scnt ON pgct.SiteContentID=scnt.ID
  inner join dbo.ContentTypes atyp ON scnt.ContentTypesID=atyp.ID

  where
  spgs.ID = @PageID or
  spgs.ID = (select templatepageid from sitepages where id=@PageID)
  AND
  (scnt.Deleted = 0) AND (spgs.Deleted = 0)
  )