Editing page from within FAQ dashboard deletes additional Main sections

Permalink Browser Info Environment
Hello,

This addon is working great except one small thing - if I go to the page and add additional blocks into the main section, and then do any updates from the FAQ dashboard, my additional blocks will be deleted. I'm adding Expand/Collapse blocks after my Content block.

The workaround is that I could always edit the page from the page, and never from the dashboard after creating it, but the dashboard is pretty handy.

Is there a way to make FAQ not touch additional blocks? Would it be alright if I added a new section after Main in my page type? (a copy of main section with a different name) Or better yet, is there a way to add the Expand/Collapse block inside the content block?

Any ideas or leads would be appreciated! Thanks!

(extra info: I added the code to hide Read More if needed with the custom attribute, and I have a special page type created for FAQ pages)

Type: Discussion
Status: New
AVL
View Replies: View Best Answer
GregJoyce replied on at Permalink Reply
GregJoyce
Hi, this addon is mainly a developer tutorial and really isn't something you want to rely on as an FAQ section.

I think the reason that your blocks are probably getting deleted is because it is still 'acting' like a single page. How did you change it into a page type?
AVL replied on at Permalink Reply
AVL
Maybe I'm not explaining correctly... I created a page type called FAQ Custom Page - but really I could be using any page type - it's not connected to the addon in any way. I just mentioned it, in case I could add a special section to it that wouldn't affect other pages.

I use the addon to create a new single FAQ page, for example "Where are you located?" Then I go to that page and edit directly on the page - and I want to add extra content beyond the Main Content Block. Say I add a couple of expand/collapse blocks, or a google map in the Main area that are needed for my answer, etc.

Then I noticed this issue when I went back to the FAQ addon in the dashboard, and decided to update the page's summary description or page name, and when I save, it deletes all additional blocks beyond the one Main Content Block that is included in the FAQ page edit form. So now all the expand/collapse blocks delete off the page and the google map or what have you.

There's something in the FAQ form that takes what you write in the Full Description content field and saves that on top of the whole Main section of the actual page (ie: deletes all other blocks in the Main section).

If I can't find another way, I think I will just add a new section to my Page type called AdditionalMain or something like that, and see if the FAQ page leaves that alone.
AVL replied on at Permalink Best Answer Reply
AVL
Ok, that did the trick. I added a new area to my page type and the FAQ dashboard doesn't seem to mess with it. So I only use one content block to put the first content (provided in the dashboard form) and any additional blocks on the page go in this area:

<?php  $a = new Area('AdditionalMain'); $a->display($c); ?>


I just didn't realize how easy it would be to add a new area.
GregJoyce replied on at Permalink Reply
GregJoyce
Cool, glad you figured that out.

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.