Further improve macros and implement more macros #367

Open
opened 2020-12-24 14:21:47 +00:00 by matthijskooijman · 0 comments
matthijskooijman commented 2020-12-24 14:21:47 +00:00 (Migrated from github.com)

This is a bit of a placeholder issue for further Macros-related improvements and a followup of #298. If specific parts of this issue are prioritized, they might warrant a separate issue for further discussion.

Some ideas on additional usecases for this

  • Showing a list of users
  • Showing or hiding content based on external data (logged in user, a cookie, current url, etc.)
  • Showing an agenda of items (e.g. after #131)
  • Embedding registration for a newsletter into another page
  • Donations
  • Showing article comments (e.g. most recent comments on the entire site)
  • Allowing comments in other places too (e.g. on a textpage)
  • Inserting a chatbox (might already be possible with some javascript now, though)
  • Inserting a poll
  • Inserting external content (e.g. Meetjestad sensor data)
  • Viewing site statistics
  • Showing related articles

Note that something like "Showing related articles" is not really a macro at first glance, since you wouldl likely want to put that on every article, not only the ones where you manually include this macro code. However, that suggests another use for macros: Maybe you could globally config something like "On all pages with type=peer_reviewed_article, append the related_articles macro to the #pagefooter element". This would certainly be a later addition, though.

As for improving macros themselves:

  • It would be interesting if macros could describe themselves and their parameters, to facilitatie some GUI-assistance in invoking these macros. This might also be useful on a shorter term to maybe generate documentation about available macros and their available parameters, to be shown to users.
  • The macro base class might need some extra helper functions, in particular for parsing attributes (arguments)
  • Add pagination to the pagelist macro
  • Optimize pagelist sorting (i.e. cache dates in the index so you do not need to read all page XML files)
This is a bit of a placeholder issue for further Macros-related improvements and a followup of #298. If specific parts of this issue are prioritized, they might warrant a separate issue for further discussion. Some ideas on additional usecases for this - Showing a list of users - Showing or hiding content based on external data (logged in user, a cookie, current url, etc.) - Showing an agenda of items (e.g. after #131) - Embedding registration for a newsletter into another page - Donations - Showing article comments (e.g. most recent comments on the entire site) - Allowing comments in other places too (e.g. on a textpage) - Inserting a chatbox (might already be possible with some javascript now, though) - Inserting a poll - Inserting external content (e.g. Meetjestad sensor data) - Viewing site statistics - Showing related articles Note that something like "Showing related articles" is not really a macro at first glance, since you wouldl likely want to put that on *every* article, not only the ones where you manually include this macro code. However, that suggests another use for macros: Maybe you could globally config something like "On all pages with type=peer_reviewed_article, append the related_articles macro to the #pagefooter element". This would certainly be a later addition, though. As for improving macros themselves: - It would be interesting if macros could describe themselves and their parameters, to facilitatie some GUI-assistance in invoking these macros. This might also be useful on a shorter term to maybe generate documentation about available macros and their available parameters, to be shown to users. - The macro base class might need some extra helper functions, in particular for parsing attributes (arguments) - Add pagination to the pagelist macro - Optimize pagelist sorting (i.e. cache dates in the index so you do not need to read all page XML files)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
harmen/hypha#367
No description provided.