Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further improve macros and implement more macros #367

Open
matthijskooijman opened this issue Dec 24, 2020 · 0 comments
Open

Further improve macros and implement more macros #367

matthijskooijman opened this issue Dec 24, 2020 · 0 comments

Comments

@matthijskooijman
Copy link
Contributor

matthijskooijman commented Dec 24, 2020

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 Feature request: datatype event #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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant