Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Can I use part of a table in and Excerpt and can I create a table from multiple Excerpt-Includes?

Andrew Dacey
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 27, 2016

I want to use the data part of a table while leaving out the header row so that I can add several excerpts to form a bigger table. Help, ideas, comments??

5 answers

0 votes
Vivek Rao January 31, 2017

Thanks for the detailed answer. TBH, it seems like way more work than benefit and I'm also not confident abt my Ajax coding ability. Thanks again. 

0 votes
Confluence Man January 26, 2017

Hi Vivek,

I had a table that served as a 'Summary' of a process on many pages.  I took this table and created a single table that provided an overview of all processes in confluence based on this table.

This was a single table on a process page:

Last Review Date: 01-01-2016
Process Owner: Me
Process Support: You
Critical: Yes
Stakeholder: Some External Dude

That was transformed into the below on my Summary table:

Process Name | Critical | Owner | Support | Stakeholder | Review Date
Process X | Yes | Me | You | Some External Dude | 01-01-2016
--- more rows

It was a PITA to do tbh because I had to learn various bits and pieces to pull it off but it was effectively:

  1. Create process overview page with a single empty table
  2. Create a user-macro for the 'Summary' table that will:
    1. Take user input for various fields
    2. Pull the table from the 'Process Overview' using AJAX, check the values for changes using jQuery, update or insert into html if not already in table
    3. Push this new table back onto the 'Process Overview' page

I also need to make a method to update the 'Process Overview' page from a click rather than having to load each process page individually.

But this meant that any changes were instantly updated on the page and did not require a huge amount of overhead to perform this.

Hope that's helpful.

 

0 votes
Vivek Rao January 25, 2017

Have you found a solution? Ideally, it should be like choosing which pages to print from a document (e.g., 1, 3-5, or all). 

0 votes
Confluence Man January 28, 2016

You sound like you're trying to perform magic, like me haha. I am trying to perform something very similar to this.

First question, do you have multiple excerpts on the same page? If so, you will need to either use the multi-excerpt addon or get hands dirty with user macros. (All this does is remove the heavy lifting, you will still need a user macro to create the bigger table you want but you can probably do in jQuery in a couple lines to be honest, assuming they have the same columns).

If it is a single excerpt on a multiple pages then you can pull them in using an excerpt-include and then jQuery/javascript your table from the results.
If it is multiple excerpts on a page then maybe forget about the excerpt macro and make a macro to add classes or ID's to your excerpt information (something like:

## Body processing: Rendered
## @param class:title=Class|type=string|required=true|desc=The class(es) you want to add
$body
<script>
$("table").last().addClass("$paramclass");
</script>


What I am currently using to add classes to confluence tables).

Then on your table page, pull the information from the pages and display how you want.
My only issue with this method is that, hypothetically, if you have 1000's of pages, how long would it take to pull and parse all the information? My alternative that I am exploring now is to instead update the table page from the excerpt page whenever they are loaded rather than trying to pull all the data.

This method would, onLoad, check if the excerpt is on the table page, if it is update values otherwise create new row. Currently, I am trying to figure out how to POST to a page without having to put user credentials in the user macro.

If you find any charms, incantations or pixie dust to help with this, I'd appreciate you throwing some my way.

0 votes
Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 27, 2016

I know of no way to do this. You would need a macro that sits inside the source – and no way I know to do that. So I would say impossible.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Upcoming Confluence Events