Forum Discussion
Displaytemplate Urls in PnP templates
I guess we should use named groups in the regEx replace as described here:
http://stackoverflow.com/questions/12962114/how-to-use-named-groups-when-performing-a-regex-replace
I don't understand issue #754 enough in order to be able to think of a good fix.
If I understand correctly CQWP uses the ~sitecollection token internally and it's exported together with your template. The current PnP code is trying to replace it with {site}. Honestly this doesn't make sense to me. The ~sitecollection token is recognized by CQWP (and other WebParts using it) so when importing (applying your template) the ~sitecollection token should still be included. Can you elaborate on this?
I've just submitted a pull request which undoes the changes made for issue #754. That should fix #1066 but #754 probably needs to be reopened now...
- Feb 21, 2017
Hi paulpascha,
The orignal issue had something to do with the location of the links wihtin the CQWP.
So imagine that you take a tempalate from
~sitecollection/subsite
and apply this to
~sitecollection/subsite/subsubsite
then the url is not correct.
There should be a token that holds the url of the web so that both ~sitecollection/subsite/subsubsite and ~sitecollection/subsite are referred to as {web}
- paulpaschaFeb 21, 2017Bronze Contributor
Ah thanks! I understand the issue now... I will give this further thought to see if I can come up with a new fix