Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use variables in header / footer for template #50

Closed
jdespatis opened this issue Jan 13, 2014 · 15 comments
Closed

Cannot use variables in header / footer for template #50

jdespatis opened this issue Jan 13, 2014 · 15 comments
Assignees
Milestone

Comments

@jdespatis
Copy link

I'm using the loadTemplate() function to set values in a template.
It works great except for values that are in header / footer. They're not replaced

The reason is because PHPWord only replaces values in the body, and not in the header / footer.

It has been quoted here, with a patch to make it work:
http://phpword.codeplex.com/discussions/236472

with a more generic way here: https://phpword.codeplex.com/workitem/69

Would be nice to have this feature in the official PHPWord :)

@ghost
Copy link

ghost commented Jan 17, 2014

Hi, Jerome.

I'll handle that in the nearest time.

@jdespatis
Copy link
Author

Thanks @RomanSyroeshko

@ghost
Copy link

ghost commented Jan 22, 2014

Hi, Jerome.

Good news is that I have some code that works now.
Bad news is that I have to wait until the existing pull requests are merged before commiting the results. Otherwise I can go crazy. :)

Hope the feature will fit in 0.7.2 release.

@jdespatis
Copy link
Author

Why not merging the working code @RomanSyroeshko ?
The developers that have done some PR will just need to rebase their PR to make the PR mergeable

@ivanlanin
Copy link
Contributor

@jdespatis I've created a patch on the current develop branch based on your direction. I've also adjusted Sample_07_TemplateCloneRow on the samples folder to include variable on the header.

Please kindly test it and inform us about the result. Thanks.

@ghost
Copy link

ghost commented Mar 17, 2014

@ivanlanin, please do not include that patch into the develop branch of the PHPWord official. I will handle this issue after #58.

Thanks.

@ivanlanin
Copy link
Contributor

Ok @RomanSyroeshko. Can't wait to see us start using namespaces :) I'll leave this to you. Thanks.

@Progi1984 Progi1984 removed this from the 0.9.0 milestone Mar 24, 2014
@ivanlanin
Copy link
Contributor

@jdespatis Pull #190 from @dgudgeon to develop branch has resolved this issue. Can you please check and confirm that you can now use variable in header/footer? Thanks.

@ivanlanin ivanlanin added this to the 0.10.0 milestone Apr 13, 2014
@ivanlanin ivanlanin self-assigned this Apr 15, 2014
@Progi1984
Copy link
Member

@jdespatis Could you check and confirm it's ok for you ? Thanks :)

@Progi1984
Copy link
Member

@jdespatis Some news ?

@Progi1984 Progi1984 modified the milestones: 1.0.0, 0.10.0, 0.11.0 May 4, 2014
@jdespatis
Copy link
Author

@Progi1984 Seems to be ok

@Progi1984
Copy link
Member

Prefect, you have tested with the last version of PHPWord (0.10 for Composer) ?

@Progi1984
Copy link
Member

@jdespatis Some news ?

@ivanlanin ivanlanin modified the milestones: 0.12.0, 0.11.0 Jun 1, 2014
@jdespatis
Copy link
Author

@Progi1984 I've tested with latest dev-master (38d3d7b), and it works like a charm!

Thanks, and so sorry for the delay... Time machine should really exist...

@ivanlanin
Copy link
Contributor

Thanks for confirming :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants