I am using the Children display macro for a glossary page I am creating. From a usability perspective, yes the title is a link to the full child page, but on the parent page, it isn't obvious that the text displayed is only a snippet of the full definition. What I was thinking was to include a read more... link on the parent page so that the user is aware that for each term they need to click the link to view the full definition. Any ideas on how I can include this as part of the children display macro or achieve it some other way?
Hi @Dillon Weyer,
there are multiple ways on how to do it.
1. If you have a commercial license for Confluence (above 10 users), you also get access to Confluence’s source code. That way you could create your own custom macro by utilising the original logic with some added functionality.
The downside is that you would have to let your users know that they should use the custom macro, not the built-in one.
2. Again, if you have a commercial license, you could completely re-write the built-in macro and build a custom Confluence out of this just for you.
The downside is that some apps replace default macros with their own implementations that have additional functionality in the spaces where those apps are active (we do this for Scroll Versions app).
3. The best approach would be to use custom CSS or JS on the global or space level that adds or re-writes the links to children pages and adds a text such as "read more". That way the macro is not overwritten, and the changes are applied on the clients (end-users’ computers).
I hope this helps.
Roman.
Hi @roman, I am new to confluence so thanks for the assistance. I like idea 3, can you point me to some documentation that can guide me in terms of how I can achieve that option?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Children macro prints out the list as bullet points. Therefore, if this macro is usually in the same position on the page, it should be possible to traverse through the HTML code with JS or CSS and add a paragraph with ::after.
The custom CSS code can be inserted on a space level in Space Tools → Look and Feel → Stylesheet.
JS code can only be inserted globally in Confluence: Confluence Admin → Custom HTML.
I don’t have the exact code to share, unfortunately. But I hope this helps you.
Related links
* CSS ::after selector: https://www.w3schools.com/cssref/sel_after.asp
* How to use JS in Confluence: https://confluence.atlassian.com/confkb/how-to-use-javascript-in-confluence-313458839.html
Roman.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.