Exemple #1
0
        /// <summary>
        /// Support function, checking if SE is enabled for the given item ID.
        /// </summary>
        /// <param name="item">the tridion item</param>
        /// <returns>true if the item belongs to a publication that has active SE in this web application, false otherwise</returns>
        public static bool IsSiteEditEnabled(IRepositoryLocal item)
        {
            string pubIdWithoutTcm = Convert.ToString(new TcmUri(item.Id).PublicationId);

            try
            {
                return(SiteEditSettings.ContainsKey(pubIdWithoutTcm));
            }
            catch (Exception)
            {
                // todo: add logging (log.Error("Unable to get pubID from URI", ex))
                return(false);
            }
        }
Exemple #2
0
 public ServiceLocal(IRepositoryLocal repository)
 {
     _repository = repository;
 }
Exemple #3
0
        /// <summary>
        /// Support function, checking if SE is enabled for the given item ID.
        /// </summary>
        /// <param name="item">the tridion item</param>
        /// <returns>true if the item belongs to a publication that has active SE in this web application, false otherwise</returns>
        public static bool IsSiteEditEnabled(IRepositoryLocal item)
        {
            string pubIdWithoutTcm = Convert.ToString(new TcmUri(item.Id).PublicationId);

            try
            {
                return SiteEditSettings.ContainsKey(pubIdWithoutTcm);
            }
            catch (Exception)
            {
                // todo: add logging (log.Error("Unable to get pubID from URI", ex))
                return false;
            }
        }