3430 Posts in 1057 Topics by 734 members
|Go to End|
22 February 2012 at 10:37pm
Im currently developing a website on a local server for my company and have put in products as DataObjects after following the tutorial of DataObjects as pages part 2 on the SS bits website. This works absolutely fine but I also want to be able to have a product search on the website and realise that searcheable DataObjects is a bit awkward, however after following another tutorial I have also got this working to a degree.
I can search for products on the live version of the site, but only when im on certain page types i.e home, contact us etc. If I am on a product category or product information page (which are DataObject page types) and enter a search term then I get a page cannot be found message. Im sure it is something simple but im only a beginner in php so any advice would be appreciated.
Let me know if you want me to supply code.
23 February 2012 at 6:00am
Unfortunately I cannot provide you with a solution, but at least I think I know where the problem lies: the Search form is provided by a method of the Page class and its subtypes. Your DataObject-as-Page has not got this method, so it can not generate the form. I don’t know if simply copying the code from the Page class to your DataObject class will suffice, though.
Hope it helps,
23 February 2012 at 10:38pm
I have just tried that and your right, it hasn't made any difference. I will keep looking into it to see if there is another way around.
Thanks for your help.
|Go to Top|