INFO 2480-61: Website Database Implementation
  • Syllabus
  • Welcome Letter
  • Week 1: Software and Setup
    • Folder Structure
    • Git: Getting Started
      • Installing a Git Client
      • Creating a Local Repository
      • Making Changes and Merging them
      • Git Wrap Up
    • Git: Github
      • Creating a New Account
      • Creating a Repo on Github
      • Cloning and Forking
      • Cloning a Repo from Github
      • Pushing Changes to Github.com
      • Github: Adding a Collaborator
    • Command Box
      • Downloading the Software
      • Unzipping and Running the Software for the first time
      • Using CommandBox And Installing the UML-Info package.
      • Setting Up Your Local Server
      • Last Step
    • IDE ( Integrated Development Environment )
      • VS Code
      • IntelliJ
    • Journal
  • Week 2: Review of HTML and CSS
    • Making Point In Time and Working Branches
    • Opening our Project from Week 1 and Starting our BoxLang server
    • HTTP Calls and Requests
    • Making a Static Website Dynamic
    • Creating The Management Index.bxm
    • Creating An HTML Form with Bootstrap
    • Last Steps
  • Week 3: Working Forms and our First Table
    • Data Types
    • Case Types and Naming Conventions
    • Database Tools and Your First DB
      • Installing MySql WorkBench
      • Connecting to your MySQL database
      • Creating Your First Table
    • Working Forms
      • Separation of Concerns
      • Configuring Our Site To Use Our Database
      • Capturing Your Form Data
      • Creating Our Server Side Logic
  • Week 5: SQL and Modelling
    • Our Project And Its Users
    • Introduction to SQL
    • Completing our Articles page.
      • Adapting manageArticles.bxm to display existing articles in the database
      • Completing ManageArticles.bxm to Edit Existing Articles.
      • Making Active Articles Appear On The Public Page
  • Week 6: Managing Books
    • Introduction To Modelling
    • Our Data Models
    • Adapting Our Management Page To Be Multi-Tool
    • Creating The Manage Books Page
    • Adding Search To Our Front Index Page
  • Week 7: Working with Selects, Files, WYSIWYG and more.
    • Adding WYSIWYG Capabilities
    • Adding WYSIWYG to the Manage Books Tool
    • Adding Images To Our Store
    • Creating Our Publisher Select Control
  • Week 9: Joins and Better Searching
    • Displaying Our Publisher
    • Searching By Publisher
    • Creating a Browse by Genre
      • Adapting Our Database
      • Building our Queries: Part 1
      • Assigning Genres to a Book in our AddEdit.bxm page
      • Building our Queries: Part 2
      • Building the GenreNav.bxm
      • Adapting The Details.bxm Page to Search By Genre
  • End of Project Checkllist
Powered by GitBook
On this page
  1. Week 6: Managing Books

Adapting Our Management Page To Be Multi-Tool

Last week, we adapted our public facing index.bxm page to dynamically include whatever file we passed to it. This way we could display the carousel page when needed and the articles page when needed. We need to do the same thing to our management bookstore/management/index.bxm page.

Here are the steps you need to follow. Use bookstore/public/index.bxm as a model.

  1. Create a <bx:param /> for the variable "t" at the top of the page. Default that to manageArticles .

  2. Change the <bx:include /> which now includes manageArticles to include the file "#t#.bxm.

In bookstore/management/horizontalNav.bxm

  1. Change one of the <li> in the nav to have the text "Manage Articles". Change the href property of the <a> to open "#cgi.script_name#?t=manageArticles".

  2. Add another item in the navbar to read "Manage Books" and open "#cgi.script_name#?t=addEdit".

  3. You will need to create a page called addEdit.bxm in the bookstore/management/ folder. For now just put some dummy text in it.

  4. Make sure your site is started and open the bookstore management page. Can you use the navigation bar to switch between the Manage Articles page and Manage Books?

PreviousOur Data ModelsNextCreating The Manage Books Page

Last updated 3 months ago