[User Error] Couldn't run query: SELECT `SiteTree`.*, `Page`.*, `GhostPage`.*, `ErrorPage`.*, `RedirectorPage`.*, `VirtualPage`.*, `SiteTree`.ID, if(`SiteTree`.ClassName,`SiteTree`.ClassName,'SiteTree') AS RecordClassName FROM `SiteTree` LEFT JOIN `Page` ON `Page`.ID = `SiteTree`.ID LEFT JOIN `GhostPage` ON `GhostPage`.ID = `SiteTree`.ID LEFT JOIN `ErrorPage` ON `ErrorPage`.ID = `SiteTree`.ID LEFT JOIN `RedirectorPage` ON `RedirectorPage`.ID = `SiteTree`.ID LEFT JOIN `VirtualPage` ON `VirtualPage`.ID = `SiteTree`.ID WHERE (HomepageForDomain REGEXP '(, ^) *localhost *(,|$)') ORDER BY Sort LIMIT 1 | Table 'ss_redconsulting.page' doesn't exist
I would like to also do this Header Image on a website I am working on, but as some of you know php is not my strong point so, I have added arams code to my class Page extends SiteTree, but I seem to just get a white screen. my code is as follows
hi got it all working now, but how would I put a fallback image for pages which don't have the header field. for example login page.
I have tried putting a background image to the Div so if there is no image in the Div you would just see the background image, but it shows the path to the image not selected assets/ any one have any ideas?
Do I need to do more than upload the changed Page.php file? and the template with the $HeaderImage code? Where do I add an image? I would like a new tab where the use could upload their own header image for that page
I changed the code to <% if HeaderImage %>$HeaderImage<% end_if %> and ran the dev/build and now things are ok, but still where do I add the header image file?
I would like to be able to have an added tab where I could upload an image for that specific page. Any help will be appreciated.
I have the code in the Page.php file and I am not getting an error. When I ran the dev/build it seemed to load a bunch of things. ??? Sorry, I don;t get some of the stuff.
see the 'getCMSFields' function in Jeramie's post?
this is where the image field is attached to the 'Main' tab of the cms.
if you want to have a separate tab for the image field, say 'MyImageFieldTab', simply replace 'Root.Content.Main' with 'Root.Content.MyImageFieldTab'