You can duplicate parts of a Dashpivot template (e.g. tables or fields) by copying and pasting part of their raw code. This is useful when reusing content across templates or inserting content after a page break.
For this method, we recommend having two opened tabs to navigate between - as it requires some copying and pasting data between templates
To copy a field to an existing, separate template, follow these steps:
1. Access the Template Editor, by selecting your template > Edit Template
2. Add markers to identify the section to copy - these markers make it easier to locate the correct section in the raw code view:
Add a text field before the section you want to copy and label it something like
START
Add another text field after the section and label it
END
3. Open the raw code editor for the template, by clicking 'Show Raw Code' in the bottom left corner of the screen
4. Use Ctrl + F
(or Command + F
on Mac) to search for your START
marker - this helps you find the beginning of the section
5. Do the same to find END
6. Copy everything between the START
and END
markers in the raw code
7. Go to the template where you want to paste the section
8. Add a text field to mark the insertion point (e.g. label it PASTE HERE
or something easily identifiable)
9. In the raw code editor, search for PASTE HERE
10. In the raw code editor, find the PASTE HERE
marker, press Enter
after the comma as seen on the below screenshot, then paste the copied section
11. Exit the raw code editor, selecting 'Hide Raw Code' to confirm the section has been inserted correctly
12. You should now see the copied tables (or other content) in the new location
13. Delete the temporary markers (START
, END
, PASTE HERE
) to clean up the template
To copy a field to a new template, follow these steps:
1. In the Home Folder or relevant Team folder, select 'Add Template'
2. Add a text field to use as your insertion point (START
)
3. Do the same for your end point (END
)
4. Open the raw code editor by clicking 'Show Raw Code' in the bottom left corner, search for the START
marker, locate the comma as seen below, press enter and paste your code
5. Save and preview - your copied content should now appear in the new template
6. Don't forget to remove your markers
Note:
Markers (text fields) are only used to help navigate the raw code - they can be removed once pasting is complete
You don’t have to label them exactly 'START' or 'END' - use whatever works best for your team