Preview feature and Categories Menu

5 posts by 2 authors in: Forums > CMS Builder
Last Post: February 4, 2016   (RSS)

By Steve99 - February 1, 2016

Hello,

We're using v2.65 with a Category Menu section editor as the main Website Pages controller (in conjunction with the Permalinks plugin). The website navbar is dynamically generated, and the Website Pages content is effectively rendered via "selected category" in the List style. The kicker is we don't use a Detail page in this circumstance and the preview button displays our coded "not found" message if "no selected category". Is there a way to get a Category Menu Preview working for a List style view based on "selected category"?

Thank you,
Steve

By ross - February 2, 2016

Hi Steve

Thanks for posting.

What would you like to happen when you click the "preview" button?  Do you just want to see the one article you are working on?  

What's the URL to the front end page that displays all your records?  Have your tried putting that in as the "preview" link in your section editor?

Let me know what you think. Thanks!

-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

By ross - February 4, 2016

Hi Steve

The problem you are running into here is that your front end page is setup as a "list page" and when you are clicking the Preview button, the preview system is expecting a "detail page".  

Basically, this isn't going to work.

What you will want to look into is setting up a new front end page that's setup as a "detail page" and use that with your preview.

Does that make sense?

Let me know how you make out.

-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

By Steve99 - February 4, 2016

Hi Ross,

Okay, that most certainly makes sense. The original thought there was efficiency with a single getCategories database call, but obviously that's not going to work with the preview system. Aside from that item, the front end functionality and page load speed appeared to work well with that setup - however, we'd like to keep in line with best practices for working with CMSB and will update our code base accordingly. Thank you.

So just to recap, in order to have the preview system work as intended we'll have to use the getCategories call to handle creation of the website navigation and a separate getRecords call in the "detail" fashion to handle page rendering.

Cheers,
Steve