Issue Displaying "Home" Page Text

7 posts by 2 authors in: Forums > CMS Builder
Last Post: March 22, 2010   (RSS)

Re: [Laura] Issue Displaying "Home" Page Text

By Chris - March 18, 2010

Hi Laura,

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.
All the best,
Chris

Re: [chris] Issue Displaying "Home" Page Text

By Laura - March 19, 2010

Thank you Chris for your time. I had attached the code to the previous posting, but it seems like it didn't post. I have attached it to this post to assist you.

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?
Attachments:

phpcode.txt 3K

Re: [Laura] Issue Displaying "Home" Page Text

By Chris - March 19, 2010

Hi Laura,

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.
All the best,
Chris

Re: [chris] Issue Displaying "Home" Page Text

By Laura - March 22, 2010

Thanks Chris for the quick response!

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

Hi Laura,

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.
All the best,
Chris

Re: [chris] Issue Displaying "Home" Page Text

By Laura - March 22, 2010

Perfect! Thank you so much Chris!

As always, top notch customer support!