Jump to content

cjx2240

Members
  • Posts

    100
  • Joined

  • Last visited

Posts posted by cjx2240

  1. I am using this in a function on two websites. However on the second site, it returns nothing unless I am logged in in the front end.

    I'm assuming this must be some issue with permissions but I can't seem to track it down, everything looks the same between the two. Guests have only the standard permissions and "view-pages" is ticked - and the template of the page in question (and its parents) has no individual rules set.

    Anyone have a guess they could point me to?

  2. On 14/06/2017 at 9:21 AM, Robin S said:

    Limit Table works by hiding elements within the inputfield in Page Edit. You can make a custom solution for Repeater Matrix (or any inputfield) by using your browser tools to find the class/ID of the elements you want to remove, and hiding them with a display:none CSS rule. Add the custom styles selectively to Page Edit via a hook:

    I tried this and it worked great! Thanks. I put it in admin.php. I targeted RepeaterMatrixes where the name ended in _fixed, as that appears as a class around the item.

    For anyone else who wants to use this, it's worth noting that it's important to have some if statement, if you just load it on every page you will get js errors when the file is called by ajax (eg image upload)

    I still think there's a place though for a simple field that contains fields, without allowing you to make as many as you want. It could also have the option to be put into tabs the way fieldgroup start/end currently works.

  3. @Macrura sorry but I think the way that Micro Contexts works is going over my head a little. Maybe a video would be good to explain how that works? I'm not suggesting that for my sake but just to get the idea across for other users!

    PageTable looks good but just like Table and RepeaterMatrix my problem is that you can make as many as you want, reorder them, delete them etc.. I just need something that is like a parent field, containing other fields. Perhaps using @Robin S's suggestion and hiding all the controls on a repeater matrix might be the answer....

  4. I have used that quite a lot, and it's suitable to this page in some ways, however, it allows the user to make as many of these sections as they want and re-order them, which leads to needing much more development on the front end to account for the items being in any order or missing altogether.

    Maybe a solution would be something like Limit Table (which I found indispensable for alleviating my original issue) - but for Repeater Matrix....

  5. Just wondering what everyone's approach is to a long page which requires many different pieces of input.

    For example, imagine your homepage is laid out like this:

    • Banner
      • Title
      • Subtitle
      • Multiple background images
      • Links
    • Second banner
      • Title for area
      • Paragraph of text
      • Background image
      • Bullet points
    • Third text area
      • Image
      • Links
      • List of feature with a title/description for each
    • Call to action/banner
      • Image
      • Text
      • Link
    • News section introduction
      • News section title
    • Final call to action
      • Title
      • Description
      • Link/link text
    • List of partner logos
      • Description
      • List of images/links

    And most of these fields are not used on other parts of the site. Now, I can start of using a nice repeater matrix for banner images. I can use title, and then I can make a text field. I can make a text_2 and a text_3 and maybe a text_4 and I'm going to be able to reuse those in other templates too. I can make image, image_2 and the same thing applies. When it comes to a list of features, I might go with a ProFields Table. I have read Making efficient use of fields in ProcessWire - I found I was already using the advice within (a good read nonetheless) but still don't feel like my delivery is that efficient.

    Because a long list of fields like this is going to get incredibly busy and confusing. And is calling a lot of repeaters and a lot of different fields for this template alone going to slow the site down? Also there's a holdup every time you realise you need a new field and you have to go and create it, then save the template so you can select it. 

    Is there a better way? I think I dream of some kind of unlimited "text" field that you can create as many of as you need to... (Not like ProFields Table, where the user can create as many as they want, but where the admin can make them on the fly while setting up the template)

    We could hardcode some of these small titles etc but in my opinion that will just quickly lead to the user asking "where do I change this line of text?" I could use a wysiwyg for areas of titles and descriptions but in my experience this quickly leads to broken layouts.

    I know this is very general but I wonder if people have a smart approach to this kind of template setup that I have not considered.

  6. Hi @tpr, thanks, this would certainly work! However, to clarify, the problem with this is that it would take away control over the width from the user of the CMS (not me). I want the default to be 100%, but I still want someone to be able to set it/edit it later. At the moment I'm essentially doing what you said, by forcibly overriding it on the front-end anyway. But I don't want to do this, I want it to be 100% by default so I don't need to "fix" it with CSS.

  7. Does anyone know if its possible to change the default width of tables in Ckeditor, eg to 100%?

    I found the following:
    http://ckeditor.com/comment/129258#comment-129258

    And so I added this

    CKEDITOR.on( 'dialogDefinition', function( ev ) {
        // Take the dialog name and its definition from the event data.
        var dialogName = ev.data.name;
        var dialogDefinition = ev.data.definition;
        // Check if the definition is from the dialog we're
        // interested in (the "Table" dialog).
        if ( dialogName == 'table' ) {
            // Get a reference to the "Table Info" tab.
            var infoTab = dialogDefinition.getContents( 'info' );
            txtWidth = infoTab.get( 'txtWidth' );
            txtWidth['default'] = '100%';
        
    });

    Into /modules/InputfieldCKEditor/config.js

    But it had no effect, dialogDefinition does not seem to trigger anything. May be that my wysiwyg is inside a RepeaterMatrix (loaded with ajax)?

  8. 7 minutes ago, kongondo said:

    Glad you like the module @cjx2240

    Do you mean if disabled menu item does not show in the frontend? What's the use case? Why not just not add that menu item? 

     

    I don't follow. Please explain.

    Well, sometimes you just want to turn off a menu item, temporarily right? Like I have a client who wants to disable registrations in a few months. He can just delete it, but if he wants to put it back, then he has to get the right page and fill out (accurately) the css class again etc.

    And change type I mean, if I make a "Pages" menu item, but later I want to change the URL, or maybe make it external... I have to delete and remake. This is fine for me, but maybe less intuitive for some people.

    Basically, I am talking about things that you and I won't need, but an end-user of the CMS might ;)

  9. Yeah I get that, but then they have to tick an option.

    Lets say I have 10 options, I want to make things easier by pre-checking some of the options which are most likely to be checked.

    However, I also want the user to have the option of ticking nothing.

    If I make it required and set default values, then the user unticks everything, it doesn't accept the change on Save.

    I also don't understand the point of selecting default values in Input and pre-selected options in Details but that's not the point...

  10. I want to have a list of checkboxes and check a couple by default. However, I want to allow my users to uncheck them if they like.

    This seems impossible, am I missing something?

    Quote
    •  <field title> (<field_name>): Configured pre-selection not populated since value is not always required. Please correct this field configuration.

     

    • Like 1
  11. Thanks! :P sorry if I appear fussy, the top result, Menu Builder, has a 3.x bug, but I found the pull request that had a fix, and now I'm using that. It solves my problem and is a nice method of menu management going forward anyway. I do personally think a URL should be fully rewriteable in the CMS out of the box, but still happy with this solution :lol:

    Edit: just noticed your name from the menu builder I linked, ;) glad I had good things to say!

  12. Thanks Lost, 

    That may be the answer, that or simply make a template for menu management with a pages selector field, although that would limit my menu so it couldn't include external links... aah...

    Do you have a particular recommendation for menu builder? Can't find one that appears maintained.

  13. Sorry to bump this thread but its quite related and the thread not too old.

    If you have some pages in your site that are just in the footer, like Terms & Conditions and Help, where do you tend to put the pages in your processwire?

    For me, it makes sense to have a page called Footer, and make any menu items that will be in the footer be sub-pages of that. Then, I can build a menu from pages with parent=footer.

    However, if I do this, my urls will include their parent, eg /footer/help - obviously this is not desirable. I guess I can call footer whatever I want, like /other/help, or /information/help, but the point is more that I don't want the parent to dictate the URL for something that I want to consider a "top level" page (despite its physical location).

    I get that there are solutions to fix this in code, but I feel like this is something that should be managed in the CMS. And if not, in this particular circumstance, how would you suggest allowing the administrator to add to the footer menu?

  14. If I could make any request, it would be to make it optional to hide the file select option altogether, as personally find processwire's own method of linking to files to be really strange - useless if you don't have a separate field for uploading to that page.

    What I have done instead is have an Options field, where the user chooses file or link, and make this field or a file upload field visible, depending on that selection.

    Anyway regardless of that, this module is really great, thanks for providing it. So much better than a single text field when you want to avoid your users putting in broken links.

  15. 1 hour ago, kixe said:

    @cjx2240 Welcome to the forums. The Module pulls selectable Inputfields from InputfieldPage module. Go to the module settings of InputfieldPage and add the Inputfieldtypes you want to have available in Fieldtype SelectExtOption.

    Thanks for the reply, so am I missing something? See attached.

    I appreciate the module doesn't claim to be 3.x compatible but it's just so close!

    select_ext_1.png

    select_ext_2.png

    • Like 1
×
×
  • Create New...