Set page content to payload and assign pager if document has one.

 Returns nothing
346551
def assign_pages!
      payload["page"] = document.to_liquid
      payload["paginator"] = (document.pager.to_liquid if document.respond_to?(:pager))
    end
289143
def pageFooter(self, form_contents):
        """"""
        if not form_contents:
            form_contents = ''

        self.wfile.write('''\
    <div id="verify-form">
      <form method="get" accept-charset="UTF-8" action=%s>
        Identifier:
        <input type="text" name="openid_identifier" value=%s />
        <input type="submit" value="Verify" /><br />
        <input type="checkbox" name="immediate" id="immediate" /><label for="immediate">Use immediate mode</label>
        <input type="checkbox" name="use_sreg" id="use_sreg" /><label for="use_sreg">Request registration data</label>
        <input type="checkbox" name="use_pape" id="use_pape" /><label for="use_pape">Request phishing-resistent auth policy (PAPE)</label>
        <input type="checkbox" name="use_stateless" id="use_stateless" /><label for="use_stateless">Use stateless mode</label>
      </form>
    </div>
  </body>
</html>
''' % (quoteattr(self.buildURL('verify')), quoteattr(form_contents)))
518495
def get_page_content(id):
    
    data = _json.loads(_api.rest("/" + str(id) + "?expand=body.storage"))
    return data["body"]["storage"]["value"]
1035282
def content_property(name, doc=None):
    
    def _setter(self, value):
        if len(self.siblings) == 0:
            # In this case, assume that what the user wants is to
            # create a new sibling inside an empty object.
            self.siblings = [RiakContent(self)]
        if len(self.siblings) != 1:
            raise ConflictError()
        setattr(self.siblings[0], name, value)

    def _getter(self):
        if len(self.siblings) == 0:
            return
        if len(self.siblings) != 1:
            raise ConflictError()
        return getattr(self.siblings[0], name)

    return property(_getter, _setter, doc=doc)
863569
def initialize_page(title, style, script, header=None):
    

    page = markup.page(mode="strict_html")
    page._escape = False
    page.init(title=title, css=style, script=script, header=header)

    return page
739122
function setupPage( pageName ) {
         assert( pageName ).hasType( String ).isNotNull();

         publishDebugInfo( 'willLoad.page', { page: pageName } );

         return pageLoader.load( pageName )
            .then( page => {
               areaHelper = createAreaHelper( page, log );
               visibilityManager.setAreaHelper( areaHelper );

               const layoutPromise = layoutLoader.load( page.layout )
                  .then( layoutInfo => {
                     cleanUpLayout = renderLayout( pageElement, areaHelper, layoutInfo );
                  } );

               localeManager.subscribe();
               const layoutWidget = widget => layoutWidgetAdapterFor( areaHelper, widget );

               // instantiate controllers wrapped by widget adapters
               const widgetPromises = widgetsForPage( page )
                  .map( widget => 'layout' in widget ?
                     layoutWidget( widget ) :
                     widgetLoader.load( widget, {}, instanceContext ) );

               return Promise.all( [ ...widgetPromises, layoutPromise ] )
                  .then( results => results.slice( 0, -1 ) );
            } )
            .then( widgetAdapterWrappers => {
               publishDebugInfo( 'didLoad.page', { page: pageName } );

               activePage = pageName;
               activeWidgetAdapterWrappers = widgetAdapterWrappers;
            } )
            .then( localeManager.initialize )
            .then( () => {
               return eventBus.publishAndGatherReplies(
                  'beginLifecycleRequest.default', LIFECYCLE_EVENT, EVENT_OPTIONS
               );
            } )
            .then( visibilityManager.initialize )
            // Give the widgets (a little) time to settle on the event bus before $digesting and painting:
            .then( () => delay( WIDGET_ATTACH_DELAY_MS ) )
            .then( () => areaHelper.attachWidgets( activeWidgetAdapterWrappers ) );
      }
246113
def page(self, attr=None, fill=u' '):
        '''
        if attr is None:
            attr = self.attr
        if len(fill) != 1:
            raise ValueError
        info = CONSOLE_SCREEN_BUFFER_INFO()
        self.GetConsoleScreenBufferInfo(self.hout, byref(info))
        if info.dwCursorPosition.X != 0 or info.dwCursorPosition.Y != 0:
            self.SetConsoleCursorPosition(self.hout, self.fixcoord(0, 0))

        w = info.dwSize.X
        n = DWORD(0)
        for y in range(info.dwSize.Y):
            self.FillConsoleOutputAttribute(self.hout, attr, 
                                            w, self.fixcoord(0, y), byref(n))
            self.FillConsoleOutputCharacterW(self.hout, ord(fill[0]), 
                                             w, self.fixcoord(0, y), byref(n))

        self.attr = attr
1244432
void setPage(Page page) {
		synchronized(lock) {
			checkNotFrozen();
			if(this.page != null) throw new IllegalStateException("element already has a page: " + this);
			this.page = page;
		}
		assert checkPageAndParentElement();
	}
600995
def get_page_properties(self, page_id):
        
        url = 'rest/api/content/{page_id}/property'.format(page_id=page_id)
        return self.get(path=url)
806027
def pager(parser, token):
    
    try:
        tag_name, page_obj = token.split_contents()
    except ValueError:
        raise template.TemplateSyntaxError('pager tag requires 1 argument (page_obj), %s given' % (len(token.split_contents()) - 1))
    return PagerNode(page_obj)
212412
def set_page_label(self, page_id, label):
        
        url = 'rest/api/content/{page_id}/label'.format(page_id=page_id)
        data = {'prefix': 'global',
                'name': label}
        return self.post(path=url, data=data)
316824
def setContent(self, type_, value):
        

        if type_ in [self.CONTENT_TYPE_TXT, self.CONTENT_TYPE_URL,
                     self.CONTENT_TYPE_FILE]:
            if type_ == self.CONTENT_TYPE_FILE:
                self._file = {}
                self._file = {'doc': open(value, 'rb')}
            else:
                self.addParam(type_, value)
1191954
def setCurrentPage( self, pageno ):
        
        if ( pageno == self._currentPage ):
            return
        
        if ( pageno <= 0 ):
            pageno = 1
        
        self._currentPage = pageno
        
        self._prevButton.setEnabled(pageno > 1)
        self._nextButton.setEnabled(pageno < self.pageCount())
        
        self._pagesSpinner.blockSignals(True)
        self._pagesSpinner.setValue(pageno)
        self._pagesSpinner.blockSignals(False)
        
        if ( not self.signalsBlocked() ):
            self.currentPageChanged.emit(pageno)
5739
function takeSnapshot(page, ph, callback) {
    page.evaluate(function () {
        return document.documentElement.outerHTML;
    }, function (document) {
        if (document) {
            callback(null, page, ph, document);
        } else {
            callback('Nothing retrieved', page, ph, null);
        }
    });
}
784032
def _set_contents(self, force=False):
        

        if self.children is None:
            self._parse_children()

        contents = BytesIO()
        for child in self:
            contents.write(child.dump(force=force))
        self._contents = contents.getvalue()
        self._header = None
        if self._trailer != b'':
            self._trailer = b''
894840
def get_page(self, start_element=0, num_elements=None):
        """"""
        if num_elements is None:
            num_elements = self.batch_size
        specs = self.specs.copy()
        specs.update(start_element=start_element, num_elements=num_elements)
        return self.client.get(self.service_name, **specs)
141715
def fetch_page(self, title, method='GET'):
        
        params = { 'prop': 'revisions',
                   'format': 'json',
                   'action': 'query',
                   'explaintext': '',
                   'titles': title,
                   'rvprop': 'content' }
        r = self.request(method, self.base_url, params=params)
        r.raise_for_status()
        pages = r.json()["query"]["pages"]
        # use key from first result in 'pages' array
        pageid = list(pages.keys())[0]
        if pageid == '-1':
            raise ArticleNotFound('no matching articles returned')

        return pages[pageid]