b:page.field

<b:page.field />

Displays content from the current page

b:page is one of the most common B:tags. It displays content from the page that the visitor is currently looking at.

Let's say that we've created a page for company information and it's url is "/about". When this url is loaded, a template generates a view of the company information page. To display any contents of that page, you enter the <b:page.field/> in that template and replace "field" with a control name from the page, for example <b:page.topic/>.

Attributes

run

(optional)

Has following possible values:

  • b - Executes B:tags, hides PHP blocks
  • php - Executes PHP blocks, hides B:tags
  • all - Executes both B:tags and PHP blocks
  • showob - Shows B:tags, hides PHP blocks
  • showphp - Shows php blocks, hides B:tags
  • showall - Shows both B:tags and PHP blocks

If this attribute is not used, default is to hide both B:tags and PHP blocks.

Examples

A simple content page

In this example we are using a data model which has topic, content and additional_content fields. This template would show the contents of those fields.

<html>
<head>
    <title><b:page.title /></title>
</head>
<body>

    <h1><b:page.title /></h1>
    
    <div class="maincolumn">
        <b:page.content />
    </div>

    <div class="extracolumn">
        <b:page.additional_content />
    </div>

</body>
</html>