GET /pages/new
 GET /pages/new.xml
761762
def new
      @page = ::Page.new

      respond_to do |format|
        format.html # new.html.erb
        format.xml  { render :xml => @page }
      end
    end
64750
def pages(self):
        
        url = self._build_url('pages', base_url=self._api)
        json = self._json(self._get(url), 200)
        return PagesInfo(json) if json else None
1214220
def show
      @page = ::Page.find(params[:id])

      respond_to do |format|
        format.html # show.html.erb
        format.xml  { render :xml => @page }
      end
    end
127230
public function pages()
    {
        //Returns on pages index
        if ($this->request->isUrl(['_name' => 'pagesCategories'])) {
            return;
        }

        $pages = $this->Pages->find('active')
            ->select(['title', 'slug'])
            ->order([sprintf('%s.title', $this->Pages->getAlias()) => 'ASC'])
            ->cache(sprintf('widget_list'), $this->Pages->getCacheName())
            ->all();

        $this->set(compact('pages'));
    }
105519
def new
      @quote = Cmtool::Quote.new

      respond_to do |format|
        format.html # new.html.erb
        format.xml  { render :xml => @quote }
      end
    end
1006769
def pages(self):
        
        # Start with a page object for unknown entries if the HAR data has
        # any entries with no page ID
        pages = []
        if any('pageref' not in entry for entry in self.har_data['entries']):
            pages.append(HarPage('unknown', har_parser=self))
        for har_page in self.har_data['pages']:
            page = HarPage(har_page['id'], har_parser=self)
            pages.append(page)

        return pages
957671
def generate_pages_by_file():
    """"""
    from veripress import app
    from veripress.model import storage
    from veripress.model.parsers import get_standard_format_name
    from veripress.helpers import traverse_directory

    deploy_dir = get_deploy_dir()

    def copy_file(src, dst):
        makedirs(os.path.dirname(dst), mode=0o755, exist_ok=True)
        shutil.copyfile(src, dst)

    with app.app_context(), app.test_client() as client:
        root_path = os.path.join(app.instance_path, 'pages')
        for path in traverse_directory(root_path):
            # e.g. 'a/b/c/index.md'
            rel_path = os.path.relpath(path, root_path)
            # e.g. ('a/b/c/index', '.md')
            filename, ext = os.path.splitext(rel_path)
            if get_standard_format_name(ext[1:]) is not None:
                # is source of custom page
                rel_url = filename.replace(os.path.sep, '/') + '.html'
                page = storage.get_page(rel_url, include_draft=False)
                if page is not None:
                    # it's not a draft, so generate the html page
                    makedirs(os.path.join(deploy_dir,
                                          os.path.dirname(rel_path)),
                             mode=0o755, exist_ok=True)
                    with open(os.path.join(deploy_dir, filename + '.html'),
                              'wb') as f:
                        f.write(client.get('/' + rel_url).data)
                if app.config['PAGE_SOURCE_ACCESSIBLE']:
                    copy_file(path, os.path.join(deploy_dir, rel_path))
            else:
                # is other direct files
                copy_file(path, os.path.join(deploy_dir, rel_path))
927285
def load_page
      @page ||= Language.current.pages.contentpages.find_by(
        urlname: params[:urlname],
        language_code: params[:locale] || Language.current.code
      )
    end
1366019
def NewDoc(self, cur, URL, encoding, options):
        
        ret = libxml2mod.xmlReaderNewDoc(self._o, cur, URL, encoding, options)
        return ret
211236
def _get_pages_with_headings(self, pages: Dict) -> Dict:
        '''
        '''

        def _recursive_process_pages(pages_subset, parent_is_dict):
            if isinstance(pages_subset, dict):
                new_pages_subset = {}
                for key, value in pages_subset.items():
                    if not key:
                        key = self._mkdocs_config.get('default_subsection_title', '…')

                    new_pages_subset[key] = _recursive_process_pages(value, True)

            elif isinstance(pages_subset, list):
                new_pages_subset = []
                for item in pages_subset:
                    new_pages_subset.append(_recursive_process_pages(item, False))

            elif isinstance(pages_subset, str):
                if not parent_is_dict:
                    new_pages_subset = self._get_page_with_optional_heading(pages_subset)

                else:
                    new_pages_subset = pages_subset

            else:
                new_pages_subset = pages_subset

            return new_pages_subset

        new_pages = _recursive_process_pages(pages, False)

        self.logger.debug(f'All pages with their headings: {new_pages}')

        return new_pages
1430
public function newAction()
    {
        $entity = new Page();
        $form   = $this->createForm(new PageType(), $entity);

        return array(
            'entity' => $entity,
            'form'   => $form->createView(),
        );
    }
1351703
def new
      @faq = Cmtool::Faq.new

      respond_to do |format|
        format.html # new.html.erb
        format.xml  { render :xml => @faq }
      end
    end
271144
public function CreatePage()
	{
		$this->_myWords = $this->WordCollection();

		$this->_document = new XmlnukeDocument($this->_myWords->Value("TITLE", $this->_context->get("SERVER_NAME")),$this->_myWords->Value("ABSTRACT", $this->_context->get("SERVER_NAME")));

		if ($this->_link == "")
		{
			$this->goBack( $this->_myWords->Value("ERRORINVALID") );
		}
		elseif ($this->_action == "submit")
		{
			if (!XmlInputImageValidate::validateText($this->_context))
			{
					$this->goBack( $this->_myWords->Value("OBJECTIMAGEINVALID") );
			}
			else 
			{
				if ( ($this->_toName == "") || ($this->_toEmail == "") || ($this->_fromName == "") || ($this->_fromEmail == "") )
				{
					$this->goBack( $this->_myWords->Value("ERROR") );
				}
				else
				{
					$custMessage = $this->_myWords->Value("MESSAGE", array($this->_toName, $this->_toEmail, urldecode($this->_link), $this->_fromName, $this->_customMessage) );

					MailUtil::Mail
					(
						MailUtil::getEmailFromID(),
						MailUtil::getFullEmailName($this->_toName, $this->_toEmail),
						$this->_myWords->Value("SUBJECT"),
						"",
						$this->_fromEmail,$custMessage
					);

					$this->showMessage();
				}
			}
		}
		else
		{
			$this->showForm();
		}

		return $this->_document->generatePage();		
	}
184421
def pages_view(view):
    
    def pages_view_decorator(request, *args, **kwargs):
        # if the current page is already there
        if(kwargs.get('current_page', False) or
                kwargs.get('pages_navigation', False)):
            return view(request, *args, **kwargs)

        path = kwargs.pop('path', None)
        lang = kwargs.pop('lang', None)
        if path:
            from basic_cms.views import details
            response = details(request, path=path, lang=lang,
                only_context=True, delegation=False)
            context = response
            extra_context_var = kwargs.pop('extra_context_var', None)
            if extra_context_var:
                kwargs.update({extra_context_var: context})
            else:
                kwargs.update(context)
        return view(request, *args, **kwargs)
    return pages_view_decorator
890357
def pages(request, path=None, instance=None):
    

    if instance and instance.active:
        p = instance
    else:
        raise Http404()

    return render(request, p.tpl, get_page_tpl_ctx(p, request))
223593
def new(cls, package):
        """"""
        partname = package.next_partname("/word/footer%d.xml")
        content_type = CT.WML_FOOTER
        element = parse_xml(cls._default_footer_xml())
        return cls(partname, content_type, element, package)
55749
def append_page(page = Page.new)
            init_page_tree

            self.Catalog.Pages.append_page(page)
            yield(page) if block_given?

            self
        end