Zine

open source content publishing system


Ticket #2 (closed task: fixed)

Opened 4 years ago

Last modified 4 years ago

Blogroll and other Widgets

Reported by: mitsuhiko Owned by: entequak
Priority: blocker Milestone: Zine 0.1
Component: usability Version:
Keywords: Cc:

Description

Right now the plan is that plugins just provide functions or globals in the template namespace that you can use in a template to get some output. For example a funcion get_blogroll that returns a list of links for the blogroll. The question now is if that's a good idea. One the one hand this allows one to customize the output in detail, on the other hand just doing {{ get_blogroll() }} doesn't output something useful.

Probably the best idea is that get_blogroll and similar functions return objects with an __unicode__ method that render a small partial template. This has the advantage that you can still access attribute on it to get a customized version, on the other hand you can just do get_blogroll() in a template and you get a full blown blogroll ul (and textpress renders the template _blogroll.html in the background). Template designers could then even go and edit the template _blogroll.html to modify the output of that default call.

And then the next question is if there should be some sort of widget manager that appears as {{ render_widgets() }} in the template. In the admin panel user can then add get_blogroll and other functions to the widget area and they would appear where the render_widgets call is.

Change History

comment:1 Changed 4 years ago by mitsuhiko

A first implementation can now be seen in textpress/widgets.py.

comment:2 Changed 4 years ago by mitsuhiko

  • Owner set to entequak
  • Status changed from new to assigned

Ente is working on the blogroll now.

comment:3 Changed 4 years ago by mitsuhiko

  • Status changed from assigned to closed
  • Resolution set to fixed

The current implementation is good enough for the first release.

Note: See TracTickets for help on using tickets.