EntryPoints and Difficulties / Questions

Contentbox 4.2.1+737

The site I’m attempting to build with Contentbox is a collection of “answers”. I have Contentbox’s entry point as /answers. (I initially had it as just “/” (or “”) and may go back to that.) I switched it to /answers (as in site.com/answers/my-page-slug) so that the editor could quickly add new content via the CMS, as expected. However, there are certain pages that kind of don’t match up:

  • I have an About Us page, but I don’t want it to be /answers/about, I just want /about. Maybe there’s a routing trick here? In addition, this means that I had to create a separate Nav/Menu with absolute URL’s, rather than link to “pages”. Feels like I’m making a mistake with this. I could, since there will be limited pages, use IIS web.config rewrites, but I’m working locally in Commandbox.

  • There are pages that are more complex (I had to build my own Lucee / Lucene search, CB’s is too “sql-y”), and I need to be able to perform my searches and display search results with my own CFML code. I’ve basically had to “dummy up” a “forced Coldbox theme” to get “outside the CMS” pages to utilize as much shared code as possible. This, however, has forced me to not use theme assets, but rather my theme is reaching outside to the root assets folder. I would like to be able to have a generic CMS page, somehow, possibly use all the meta data associated with a page or contentStore item, but force feed the actual primary content, based on an outside handler. If I could get the URL’s to rewrite to /answers/searchResults page, but have that page actually “go do other stuff” other than straight content, maybe some of those {{{ things }}}. (Which I can’t seem to find good docs for.) Maybe this is a feature suggestion, but it would be kind of cool if the page manager supported (like it does for SEO title, etc.) a forced “no, you link to this, forget all that entry point stuff”, to get a “Home” page to not be answers/(index), but rather just /(index).

In typical “Belden fashion”, I might be trying to do things that the system wasn’t intended for. I’m essentially trying to mix root URLs with /entryPoint/x URL’s. I’m trying to get CB to render layout / meta information, but with forced content from a root handler.

When I say I’m having trouble with finding the docs, it’s because some doc pages are empty, such as:

I know you guys are doing ALL this documentation for free; I’m not being critical, other than to say there are indeed some gaps. I’ve spent most of my time digging through the Contentbox code trying to understand it from that point of view, but I’m sure that way leads to the (mistake) dark side. :slight_smile:

Okay, replying to my own topic, for the gratification of others (and to say “yeah, there’s still things I don’t know…”), it appears that WIDGETS are what I need. I was able to create my search widget to do the work I needed, and keep within the Contentbox system and also keep my entry point as “” (or root).

One remaining question, I could NOT figure out how to successfully pass an rc value as an argument to the widget. For search, I have “q” (query) and “p” for page. I tried ${rc.q} in the arguments definition once inserted into the page, however, that did NOT work as expected. In the end, I created the renderIt() function, and a renderWithRC() function that access the RC via the request collection, then passed those with return renderIt(argumentsCollection: {q: rc.q, p: rc.p}). Basically, with param’ing, etc.