I'm looking to get the file paths for the various layers into the QGIS print composer. This is so I can produce a block of copyright statements automatically as we use data from a wide range of sources that have different statements.
I've already tried using the layer variables, but it turns out that those don't get pulled through into Print Composer for some reason.
for layer in iface.mapCanvas().layers():
with if statements to add a marker into a string. Then do a series of if statements to add the right copyrights based on the Markers in the string and then finally return the string. When I have some time, I'm going to try and clean it up using dictionaries but this works for the moment