I have happily used GetField 1.2.1 and can reports it works with PHP 5.1.6 and 0.9.5 alright
So far I have used it only as a single call.
But now I need to have multiple calls on the same page and I get a nice blank page... I tried both cached and uncached, also uncached the page altogether but same blank page result :’(
I am running 0.9.5 rev 1732, maybe it has to do with that too...
Input ?
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id
Sorry, davidm, I can’t test the snippet with PHP 5.1.6
However I successfully used it
with multiple calls in MODx 0.9.5 build 1776 (also 1732 AFAIR).
I used a following call based on the sample site:
<h3>[[getField? &docid=`9` &field=`pagetitle`]]</h3>
<p>[[getField? &docid=`9` &field=`content`]]</p>
<h3>[[getField? &docid=`18` &field=`pagetitle`]]</h3>
<p>[[getField? &docid=`18` &field=`content`]]</p>
<h3>[[getField? &docid=`7` &field=`pagetitle`]]</h3>
<p>[[getField? &docid=`7` &field=`content`]]</p>
This is the web: the only thing you know about who will come is that you don't know who will come.
Hi grad,
Sorry for not reporting this earlier, but Heliotrope has provided me with a solution to this :
http://modxcms.com/forums/index.php/topic,8092.msg57532.html#msg57532
Paul gave me an explanation as to why the original GetField didn’t work for me :
Quote from: PaulGregory at Oct 20, 2006, 08:43 AM
Well done heliotrope.
Hmmn, seems I was still on 1.1 (you’re on 1.2.1). There’s clearly more activity on this snippet than I thought!
Intriguingly, [!GetField!] [!GetField!] worked happily for me on my test box - presumably my setup allows functions to be redeclared. This also means I can’t test the above fixes easily (because I don’t have the problem in the first place!). I’ll have to watch out for that!
How do I modify my php setup to allow functions to be redeclared ?
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id
Thanks Garry for the input, makes it clearer. Seems Heliotrope has nailed whatever broke it for multiple calls anyway
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id
It seems that my setup does allow functions to be redeclared thus I couldn’t reproduce the error. getField was intended to be used in multiple calls - that was my original need as I had to make a listing of sub-documents a part of which were not shown in the menu.
Anyway, I’ll take a look at it and update the snippet code in few days, I hope (as I am rather busy at the moment). I didn’t realize my little snippet is of such a wide usage. That’s nice it turned helpful for someone
Also, I didn’t know there is a wiki for MODx! Have to take a look at it.
This is the web: the only thing you know about who will come is that you don't know who will come.
I updated repository with version 1.2.2 which has a quick fix to "Cannot redeclare function..." error.
In the next few days I plan to rework the code to meet coding guidelines from MODx wiki.
This is the web: the only thing you know about who will come is that you don't know who will come.
Thanks a lot grad, at least the error message will help those who have a limiting config like me...
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id
Ladies and Gentelmen
I would like to present a brand new version of GetField. The changes to the code are significant, however nothing changes in the way it works. You don’t have to change the calls you already made.
I applied coding guidelines from
MODx Wiki and made the package compatible with MODx Resource Wizard. Therefore I kindly ask you to test this beta and report how it behaves before I post it in the repository.
I hope you will like it
This is the web: the only thing you know about who will come is that you don't know who will come.
Great work, making it unnecessary to change the call, sticking to dev procedure and making it compatible with the Resource Wizard : cool
Thanks !
I’ll update and report
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id