<% ' Auto-generated Controller: Posts ' Generated on 5/2/2026 9:47:38 PM ' Generator: generateController.vbs v1.0 ' ' Remember to: ' 1. Add to app/controllers/autoload_controllers.asp ' 2. Register in core/lib.ControllerRegistry.asp ' 3. Add routes in public/Default.asp Class PostsController_Class Private m_useLayout Private m_title Private Sub Class_Initialize() m_useLayout = True m_title = "Posts" End Sub Public Property Get useLayout useLayout = m_useLayout End Property Public Property Let useLayout(v) m_useLayout = v End Property Public Property Get Title Title = m_title End Property Public Property Let Title(v) m_title = v End Property '--------------------------------------------------------------- ' Action: Index '--------------------------------------------------------------- Public Sub Index() ' TODO: Implement Index action Response.Write "Index action called" End Sub '--------------------------------------------------------------- ' Action: Show '--------------------------------------------------------------- Public Sub Show(slug) ' TODO: Implement Show action Response.Write "<strong>Show called</strong><br>" Response.Write "Parameters:<br>" Response.Write "slug = " & Server.HTMLEncode(CStr(slug)) & "<br>" End Sub '--------------------------------------------------------------- ' Action: New '--------------------------------------------------------------- Public Sub New() ' TODO: Implement New action Response.Write "New action called" End Sub '--------------------------------------------------------------- ' Action: Create '--------------------------------------------------------------- Public Sub Create() ' TODO: Implement Create action Response.Write "Create action called" End Sub '--------------------------------------------------------------- ' Action: Edit '--------------------------------------------------------------- Public Sub Edit(id) ' TODO: Implement Edit action Response.Write "<strong>Edit called</strong><br>" Response.Write "Parameters:<br>" Response.Write "id = " & Server.HTMLEncode(CStr(id)) & "<br>" End Sub '--------------------------------------------------------------- ' Action: Update '--------------------------------------------------------------- Public Sub Update(id) ' TODO: Implement Update action Response.Write "<strong>Update called</strong><br>" Response.Write "Parameters:<br>" Response.Write "id = " & Server.HTMLEncode(CStr(id)) & "<br>" End Sub '--------------------------------------------------------------- ' Action: Delete '--------------------------------------------------------------- Public Sub Delete(id) ' TODO: Implement Delete action Response.Write "<strong>Delete called</strong><br>" Response.Write "Parameters:<br>" Response.Write "id = " & Server.HTMLEncode(CStr(id)) & "<br>" End Sub End Class ' Singleton instance Dim PostsController_Class__Singleton Function PostsController() If IsEmpty(PostsController_Class__Singleton) Then Set PostsController_Class__Singleton = New PostsController_Class End If Set PostsController = PostsController_Class__Singleton End Function %>
Powered by TurnKey Linux.