Hey Kirby-folks,
I am currently writing my very first Kirby-plugin and have a question. Especially concerning Kirbytags. I register my own one and in it’s html-function I want to know (1) how many tags of the same kind came before and (2) will come after the current tag.
May I asked why you want to do that?
May I asked why you want to do that?
Of course ![]()
I’m making a small inline-gallery with lightbox-support. I need to inline some markup for the modal (but only once) on the page. I want it to be inlined automatically by the plugin but not more often than once and not when there is no gallery on the page.
I think that might get a bit difficult. You can get the page object with $tag->page(), so you basically have access to everything in that page. However, while you could find all tags using regex, I’m not sure how to identify the current tag
I don’t think this is worth the effort.
I inserted it dynamically with JS. Thanks anyway!!