Front end Widget

  • Thank you for attention , but i miss again paths:

    Follow instructions of hellowidget exmple here (is more simple)

    #Define widget positions -- For me is clear

    i can add positions, ok


    #Render Widgets

    clear, understand


    #Register a new widget type

    "you can make use of the widgets property in your index.php file"

    here i begin to lost myself, i checked many index.php files but i cannot understand where put exactly

    'widgets' => [



    /app/system/modules/hellowidget ?

    #Define a new widget type

    If i didn't understand wrong i have to

    copy hellowidget.php in /public_html/app/system/modules/widget

    create folder


    to copy inside widget.js


    create folder /app/system/modules/view

    and copy inside widget.php

    surely not because i cannot make it works :whistling:

  • Hi,

    I think there are some things mixed up.

    /packages/pagekit/theme-hello/index.php and /packages/pagekit/theme-hello/views/template.php are belonging to a theme.

    The part


    'widgets' => [



    belongs to the index.php of a widget. A widget is not bundled with a theme, a theme just defines where to render the widgets ( = Widget positions).

    If you create a new widget, which, for example, shows an RSS feed, you would probably do something like


    'widgets' => [



    And place the rssfeedwidget.php in the widget-folder of your extension ( = your widget).

    Using the example I used above:



  • No. You create a package which is istalled to /packages/...

    There is a really good Tutorial (with videos) in the docs, which shows how to create an own extension. A widget is an extension, too, so you can use your learnings to create your own widget.