Multiple Placeholders #415
-
I have a question. Why did you remove the ability to have multiple placeholders on a powerpoint slide (or even to get multiple locations for those placeholders)? I actually use that quite a lot when I have text that I know to be the exactly the same in different places on the slide (which is very common given what I do and what I automate). It helps me keep my code clean and allows me to easily debug/check the template and code to make sure everything is going in the right place. I think this used to be allowed in a very old version of the package, but a while ago, you removed the ability to do it in ph_with for placeholders. However, I was able to get around that limitation by using fortify location directly and then using the locations to place the text in the placeholders. However, in a recent version of officer, you made fortify location (specifically
This is oddly an incredibly important feature for how I program automated reports, even if it is a bit off-label. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
I don't understand what you are referring to, there is no limitation on the ability to have multiple placeholders on a PowerPoint slide. Could you share a some code that help me to figure out how to reproduce? |
Beta Was this translation helpful? Give feedback.
-
Sorry. Not having multiple placeholders in general, having multiple placeholders with the same name on the same slide. Like if I want to put "Copyright 2022, Me" multiple places on a pptx slide, I will have the placeholder name "copyright" in every place where I want to put that text. |
Beta Was this translation helpful? Give feedback.
-
The label must be a unique id since the function Because of this issue 363, I changed the mechanism, from The warning was there since the beginning. How could you have use that function with multiple similar id/labels? Please share a code, it makes no sense to me. |
Beta Was this translation helpful? Give feedback.
-
You're right. I've always had to cycle through it. I just checked my old code. This was a long time ago, and I was using your old interface with
That said, it used to give a warning and now gives an error in the |
Beta Was this translation helpful? Give feedback.
@swnydick, as @davidgohel points out here,
ph_location_type()
already takes theid
as a parameter to reference a ph.Can this thread be marked as answered or is there more functionality needed for your use case?