Page
Discover how to use page objects in BuckShotPlusPlus!
Last updated
Was this helpful?
Discover how to use page objects in BuckShotPlusPlus!
Last updated
Was this helpful?
In , pages represent the individual screens or web pages of your application. While they are similar to , pages are specifically designed to define the structure and content of a complete web page.
To declare a page in , you use the page
keyword followed by the name of the page and its properties enclosed in curly braces. The properties of a page define its title, body and other attributes.
Here's a basic example:
In this example, a page named index
is declared with a title "My Index!" and a body content defined by the My_Body_View
view.
The name of the page determines its URL. For instance, the index
page corresponds to the root URL (/
). If you name your page something other than index
, the page's URL will be based on its name. For example:
This will create a page accessible at the /blog
URL.
Website Structure: Pages allow you to define the structure of your website, specifying which content appears on which page.
Dynamic Content: By associating different views with different pages, you can create dynamic web pages that change based on user interactions or other conditions.
Remember that the name of the page determines its URL, so choose names that are relevant to the content of the page.
In BuckShotPlusPlus, you can easily import custom fonts using the fonts attribute and specify an of url's like in the following example:
SEO Optimization: By giving descriptive names and titles to your pages, you can improve the search engine optimization () of your website.
Always use descriptive names for your pages to make your website more user-friendly and improve .
Ensure that the associated with a page are correctly defined and tested to avoid rendering issues.