Im going by the code snippet below from
http://rtfm.modx.com/display/revolution20/PHP+Coding+in+MODx+Revolution,+Pt.+I
// getting a resource (i.e. a page) that is published, with a alias of 'test'
$document = $modx->getObject('modResource',array(
'published' => 1,
'alias' => 'test',
));
I'm creating a store and now I just need to access my resources so I can do things like,
1) access an array of children (products)
2) create a search form to search all product descriptions for keywords typed in the search
maybe i'm misunderstanding what 'alias' is but im trying to access a single wig resource with
// getting a resource (i.e. a page) that is published, with a alias of 'test'
$document = $modx->getObject('modResource',array(
'published' => 1,
'alias' => 'synthetic-wig-1',
));
synthetic-wig-1 being the url alias of the resource
anyways when I add that line of code to a php snippet that displays products it breaks the page and gives me a
HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request
Please, any assistance would be greatly appreciated. I'm fairly new to web world and especially complex php sites with a CMS. the site is
http://thehaircorporation.com/
EDIT: I just realized my version when look in my manager info is MODx version 1.0.5
is this version Evolution or Revolution? Am I on an old version?
Thank you,
William
[ed. note: whaus77 last edited this post 12 years, 3 months ago.]