returns the title for the given post/page
 Params:
 +id+:: ID, post_slug, or post_title - if this is nil it will use the @content variable (the current page)
9686
def obtain_the_title(check = nil)
    	post = obtain_record(check)
    	render :inline => post.post_title if !post.blank?
    end
1259406
def obtain_record(check = nil, type = nil)
      
      return check if check.is_a?(ActiveRecord::Base)

      if check.blank? 
        return nil if @content.blank? || !@content[0].blank?
        @content
      else
        records = Post.where( 'post_title = :p OR post_slug = :p2 OR id = :p3', { p: check.to_s, p2: check.to_s, p3: check.to_i} )
        if !type.blank?
          records = records.where("post_type = :p4", {p4: type})
        end
        records.first
      end

    end
722725
def get_title(self):
        
        try:
            return extract_literal(self.meta_kwargs['title'])
        except KeyError:
            slot = self.get_slot()
            if slot is not None:
                return slot.replace('_', ' ').title()

            return None
910000
def title
      return @title if @title
      if matches = class_const(:TITLE_RE).match(page)
        @title = matches[1].to_s.strip
        title_processor
        @title = decode_entities(@title)
      end
    end
1336362
def is_page?(check = nil)

      return false if @content.blank? || !@content[0].blank?
      return true if @content.post_type == 'page' && check.blank?
      return true if @content.id == check.to_i
      return false

    end
1293310
def get_text(self, title):
        
        r = requests.get(self.api,
                         params={'action': 'parse', 'page': title, 'format': 'json'},
                         headers=self.header)
        jsd = r.json()
        return jsd['parse']['text']['*']
201018
def obtain_article_status(check = nil)
      article = 
        if check.blank? && !@content.blank? && @content[0].blank?
          @content
        else
          obtain_record(check, 'page')
        end
      !article.blank? && article.has_attribute?('post_status') ? article.post_status : nil
    end
1047273
def get_page_property(self, page_id, page_property_key):
        
        url = 'rest/api/content/{page_id}/property/{key}'.format(page_id=page_id,
                                                                 key=str(page_property_key))
        return self.get(path=url)
189605
def get_content_slug_by_slug(self, slug):
        
        content = self.filter(type='slug', body=slug)
        if settings.PAGE_USE_SITE_ID:
            content = content.filter(page__sites__id=global_settings.SITE_ID)
        try:
            content = content.latest('creation_date')
        except self.model.DoesNotExist:
            return None
        else:
            return content
875882
def post_post():
    
    authorid = request.form.get('authorid', None)
    Post(request.form['title'],
         request.form['content'],
         users[authorid])
    return redirect("/posts")
14288
def create_title(self, page):
        
        for language_code, lang_name in iter_languages(self.languages):
            try:
                title = Title.objects.get(page=page, language=language_code)
            except Title.DoesNotExist:
                slug = self.get_slug(language_code, lang_name)
                assert slug != "", "No slug for %r" % language_code
                title = create_title(
                    language=language_code,
                    title=self.get_title(language_code, lang_name),
                    page=page,
                    slug=slug,
                )
                log.debug("Title created: %s", title)
            else:
                log.debug("Page title exist: %s", title)
1246076
def title(self):
        
        if self._title is None:
            self._title = self.get_title()
        return self._title
26988
def show
      if params[:page_name] == "website"
        return render json: Website.unique_instance.as_json_for_page
      end

      page = Pwb::Page.find_by_slug(params[:page_name])
      if page
        render json: page.as_json_for_admin
      else
        render json: {}
      end
    end
790891
def get_select_title_url(self, attach=None):
        
        return self._post(
            'biz/getselecttitleurl',
            data={
                'attach': attach,
            },
            result_processor=lambda x: x['url'],
        )
1298314
public Title getTitle(int pageId) throws WikiApiException {
    	Session session = this.__getHibernateSession();
        session.beginTransaction();
        Object returnValue = session.createNativeQuery(
            "select p.name from PageMapLine as p where p.pageId= :pId").setParameter("pId", pageId, IntegerType.INSTANCE).uniqueResult();
        session.getTransaction().commit();

        String title = (String)returnValue;
        if(title==null){
        	throw new WikiPageNotFoundException();
        }
        return new Title(title);
    }
820577
def param_title(param_values, slug):
    
    for val in param_values:
        if val.param.slug == slug:
            return val.param.title
    return None
69257
def post_params
			# Ensure post title is sanitized of all HTML
			if params[:post].include? :title
				params[:post][:title] = HTMLEntities.new.decode(Rails::Html::FullSanitizer.new.sanitize(params[:post][:title]))
			end

			params.require(:post).permit(:title,
			                             :body,
			                             images_attributes: [:id, :image, :_destroy])
		end