Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID

Remove wysiwyg from Add page

edited March 2013 in Design

I want template pages in the Extra options section of add page that already contain blocks. Available pages would be like: Video, Landing, Competition etc.

Currently you can't save a page without body content, also how can I make the pages visible to admin so they can edit the blocks and add their content in the wysiwyg without the page being public.

Thanks again Selwyn

Comments

  • Also making pages visible without being in the site tree as landing pages roll those ways.

  • Hi Selwyn,

    You can create as many layout templates as you need, and they'll all be available in the Page layout dropdown under the extra options. Each one can include different editable blocks, or even hard-coded includes like {! social/video/youtube?url=http://youtu.be/ry77_7xFc6c !}

    You would have to create a page for a layout to be shown on, but you can just enter a few empty spaces into the body if you don't want any content there. To make a page visible to admins only, set the Access field to Private. You can then find it under the Tools > All Pages screen to view and edit until it's ready to be made public and added to the site navigation so visitors can find it.

    Of course, a public page can always be visited if you link to it, so landing pages don't need to be in the site navigation. Just grab the link to it and send people there.

    Let me know if that answers your questions :)

    Cheers, Johnny

  • Almost perfect

    So my page is created and public but not in the site navigation fulfills my requirement as its still visible.

    So the spaces added in the wysiwyg editor won't add space to the page content?

    Ok then, the page created title could become the h1 if this is the only work around, but would prefer the editor gone from this page for those less than savvy. I just feel that the editor visible in this instance (add page) is wasted space as the page and blocks will have already been coded in the page layouts available under extra options.

    hope this is a little more clear

    Thanks Selwyn

  • Oh and thanks again Johnny, superb support and (excuse the four letter expletive) but ****ing great product!

    Have already removed the designer option from top-bar plus codemirror and fancybox as these features will only be useful to a coder.

    Added foundation 4 in test and despite the documentation I've found it works on browsers below their recommendations which is quite promising, although the zepto needs to be swapped for jquery depending on the target audience os capabilities. I wonder if ie's ears are burning.

    My client base is middle age and up with little to no understanding of a site or cms internal workings which is why I'm looking to trim the fat.

  • So you don't want site editors to see the edit options for the page itself on these landing pages?

    In that case, I would omit the {{body|none}} tag altogether, that way the body contents aren't added at all in those layouts (so anything you enter in the body won't show up on the page). The edit buttons are prepended to the body so those will disappear too.

    Of course, you'll always be able to edit those pages from the Tools > All Pages list should you need to, but your changes would all be controlled by the layout template instead for the most part.

  • The landing pages will still be editable just like all other pages. Just not added to the nav but still publicly visible.

    Its the Add Page section without the wysiwyg I'm looking for as all editable blocks are available on the specific pages from the drop down in extra options. Then when the page is viewed the blocks can be edited before making them public or adding to the site tree. As the page can be deleted from All Pages or removed from the site tree this reduces the number of actions performed.

    As the body tag is required how can this be achieved without the need for the editor on initial page creation.

    Hope this makes things a little clearer.

  • edited March 2013

    Would making the body field optional be enough to solve it? If so, you could modify the apps/admin/forms/add.php and apps/admin/forms/edit.php and comment out the validation rule for the [body] section. Then they could ignore the body field when adding pages.

    To hide the body field altogether would involve editing the apps/admin/views/add.html file and changing these lines:

    <p>{"Body"}: <span class="notice" id="body-notice">{"You must enter body content."}</span><br />
    <textarea name="body" id="webpage-body" cols="90" rows="28">{{ body }}</textarea></p>
    

    To this:

    <!--
    <p>{"Body"}: <span class="notice" id="body-notice">{"You must enter body content."}</span><br />
    <textarea name="body" id="webpage-body" cols="90" rows="28">{{ body }}</textarea></p>
    -->
    <input type="hidden" name="body" value="{{body|quotes}}" />
    <script>$(function () {
        webpage_show_extra_options ($('.extra-options-link')[0]);
    });</script>
    

    That would hide the body field, and should cause the Extra Options section to default to being open instead of closed, but you'd still have to modify the validation rules like I mention above to allow for an empty page body.

  • Magic Johnny

    One question, on click add page the window opens with extra options visible and you have to scroll back to see Add Page, page title and page ID. How do I stop this?

  • Ah yes, there's a window.scrollTo (0, 1000); in that function. Try this change instead:

    <!--
    <p>{"Body"}: <span class="notice" id="body-notice">{"You must enter body content."}</span><br />
    <textarea name="body" id="webpage-body" cols="90" rows="28">{{ body }}</textarea></p>
    -->
    <input type="hidden" name="body" value="{{body|quotes}}" />
    <script>$(function () {
        $('#extra-options').show ();
        $('.extra-options-link').find ('.arrow').removeClass ('arrow-off');
    });</script>
    
Sign In or Register to comment.