Issue Displaying "Home" Page Text
7 posts by 2 authors in: Forums > CMS Builder
Last Post: March 22, 2010 (RSS)
By Laura - March 18, 2010
I have created a website using the category type of Section Editors. The UI and Code Generator code are located within the index.php file on the webserver. I have copied the code in the attached index.txt file.
The first category within CMS Builder is called Home. It contains what the user should see when they click on the website. It can be seen at the following URL: http://www.jonescountyclerkofcourt.org/index.php?Home-1
The URLS are set up within CMSBuilder in the Section Editor List and Display Page URL field are: http://www.jonescountyclerkofcourt.org/index.php
I need when people click on http://www.jonescountyclerkofcourt.org/index.php they see the text that is displaying in http://www.jonescountyclerkofcourt.org/index.php?Home-1.
Where have I gone wrong?
Re: [Laura] Issue Displaying "Home" Page Text
By Chris - March 18, 2010
Try replacing this line:
'where' => whereRecordNumberInUrl(1),
with this:
'where' => whereRecordNumberInUrl("num = 1"),
The default (1) is supposed to select the first record in the section, so I'm confused why that's not working for you. If you post your full PHP source code I might be able to figure out what went wrong, but the fix above should solve the problem too.
I hope this helps! Please let me know if you have any questions.
Chris
Re: [chris] Issue Displaying "Home" Page Text
By Laura - March 19, 2010
I don't have that line of code. Mine is set up using code provided in the forums to automatically generate an unordered listing menu by setting up your site using the Category Menu style in CMS Builder. This was necessary as my client wants the ability to automatically add items to the menu through CMS Builder but doesn't have the technical capability to code it themselves.
Does this help?
Re: [Laura] Issue Displaying "Home" Page Text
By Chris - March 19, 2010
A ha! You're using getCategories(), which I should have guessed from the indentation in your list. :)
Try changing this line:
'selectedCategoryNum' => '', // defaults to getNumberFromEndOfUrl()
...to this:
'selectedCategoryNum' => getLastNumberInUrl(1), // default to get num 1 if no num supplied on URL
I hope this helps! Please let me know if you have any questions.
Chris
Re: [chris] Issue Displaying "Home" Page Text
By Laura - March 22, 2010
I changed the code and get the following error:
Fatal error: Call to undefined function getLastNumberInUrl() in /hermes/bosweb/web194/b1944/ipw.jonescounty/public_html/index.php on line 8.
Line 8 being the line replaced with the text above. Thoughts?
Re: [Laura] Issue Displaying "Home" Page Text
By Chris - March 22, 2010
Oops, getLastNumberInUrl() is the new name for that function, please use getNumberFromEndOfUrl() instead:
'selectedCategoryNum' => getNumberFromEndOfUrl(1), // default to get num 1 if no num supplied on URL
I hope this helps! Please let me know if you have any questions.
Chris
Re: [chris] Issue Displaying "Home" Page Text
By Laura - March 22, 2010
As always, top notch customer support!