Jump to content

2hoch11

Members
  • Posts

    63
  • Joined

  • Last visited

Posts posted by 2hoch11

  1. On 6/6/2020 at 5:31 PM, Nick Belane said:

    Hi Joshua, the module works fine.
    I would like to use the Textformatter to generate a button. [[privacywire-choose-cookies]]
    But I don't get how to implement the shortcode.. ?
    In a Textfield? That doesnt work. Sorry for this noob-question.
    Thank you!

    Ok..now I got it!

    …I made an TextInputField (site_setup_cookiebox_toggler_text)

    Then in the "Details" tab: Text Formatters > PrivacyWire Textformatter

    I added this field to the home template. Then I pasted this [[privacywire-choose-cookies]] in the text field. The outputted the field content for the frontend:
    $pages->get('/')->site_setup_cookiebox_toggler_text

    It works but I wantet this in the template (without that workaround).

    I tried this, but no luck:

    $privacyWire = $modules->get('TextformatterPrivacyWire');
    echo $privacyWire->render("[[privacywire-choose-cookies]]");

    What was your solution?

  2. I have the same problem. I have a fresh install of the latest PW and cannot edit any Textarea fields…

    "Call to a member function className() on null in wire/modules/Fieldtype/FieldtypeTextareaHelper.php:62"

    …so what exactly ist the solution?

    Did youinstall or delete the TextareaCounter module (witch i cannot find)?
    I found this: 

     but this post is from 2014…

  3. 5 minutes ago, adrian said:

    Does a modules > refresh help?

    If I'm opening the Module Update Page (/processwire/module/?reset=2) there ist nothing to update:

    image.thumb.png.48d92042c203c702535af9f610d07ea1.png

    On the module page, if I hit "Look for an update" the backend outputs: "That module is not currently tracked by the modules directory":

    image.thumb.png.fc4234a23ecc9480c5d389251557c1d5.png

  4. 3 minutes ago, adrian said:

    I just tested and it's working fine here. Can you take a look at the browser dev console to see if there are any JS errors?

    As Kholja mentioned:

    it works only if there is a Texarea Field that uses CKEditor. And ideed, it works… but this dependency is strange… but not technically

    • Like 1
  5. On 12/5/2014 at 5:09 PM, OllieMackJames said:

    Thanks adrian, I just found out that what I want already is part of profields...

    I am using ProFields but none of them opens an "Insert Link" modal box…

    I can remember I saw a module that does exactly that (url for internal or external pages, page select, target) but I can't find it anymore...

  6. I had this moster on my search result page:

    $selector = "template=produkt, check2|check_temp=1, (title|text|text_editor_minimal|text_editor|text_editor2|text_editor3|search_index~=$q), (produkt_hersteller.title%=$q), (produkt_bereiche.title%=$q), (produkt_anwendungen.title%=$q), (produkt_verwendungen.title%=$q), (produkt_geratetypen.title%=$q), (produkt_gruppen.title%=$q), (produkt_verdichter.title%=$q), (produkt_kaltemittel.title%=$q), (produkt_gwp.title%=$q)";

    It worked so far. After I updated PW to 3.0.165 I got an Internal Server error. So far so good. I updated SearchEngine too. No change. I removed piece by piece parts of the selector. Finally I realised that the subfield selectors (like produkt_hersteller.title) caused the error.

    Now I ended with this selector:

    $selector = "template=produkt, check2|check_temp=1, (title|text|text_editor_minimal|text_editor|text_editor2|text_editor3|search_index%=$q)";

    Has anybody an idea why subfield selectors don't work anymore?

  7. Just in case somebody needs to get the override label in the current language… I did…

    // Get label in current language
    echo $templates->get('template_name')->fieldgroup->getField('my_field_mame', true)->getLabel();
    
    // OR directly from the page (no matter how the templates name is):
    echo $page->template->fieldgroup->getField('my_field_mame', true)->getLabel();

    This is a way faster than using translate stings in the template: __("I'm an in english headline, translate me!")

    • Like 3
  8. On 7/16/2019 at 9:41 AM, teppo said:

    Anyway, currently the ("full", i.e. a form and a results list) rendered state looks like this:

     

    #1 "Full" result
    How can I get this "full" result? The "standard" rendering outputs just the title and the URL.

    #2 Languages
    I assume that it needs "manual" rendering to output a language specific output … instead of english ("Search results", "x results for:", and so on) …

    #3 Select (product) field
    Taking consideration of #1 and #2 … I have a repeater matrix in the basic-page(es). I use manual indexing in the SearchEngine Module. RepeaterMatrix > Text fields are working well with this setup. I set the "search_index" field to "visible in editor" and this is what it stores (for example in french):

    Vente au détail Solutions pour votre application de vente au détail Si vous êtes propriétaire d'un appartement, responsable d'un datacentre ou directeur d'hôtel, nous avons des exemples et des solutions pour chaque besoin d'application. Array Exemples & Solutions : Array Array Array Array 
    {}

    (…there's a lot of "Array" here… hmm…)

    One of the repeater matrix items is just an option field (to select a product category [green products, yellow products, brown products…]). This is just an information what to render in frontend, but the product texts are stored in different pages. So there is no text/product-infos to store in the "search_index" field.

    How can I manage to insert the selected products into the "search_index" field?

    My first thought was to add a new field to the template… let's call it "search_dump". On every "page save" I populate this text area according to the RepeaterMatrix -> product_selection field (I guess this can be done by a hook). Then I have to recreate the search index manually in the backend GIU or by API:

    $modules->get('SearchEngine')->indexPage($page);
  9. 2 hours ago, HerTha said:

    This matches numerical IDs only, right? Could that be the reason for not working with text like 'agb'?

    @HerTha Thanks … indeed. I did not notice that…

    Now I have to sum this up (for idiots like me):

    To redirect from index.php with an id attribute:

    /index.php?id=123 -> /impressum/ 
    /index.php?id=agb -> /agb/

    Put this in your PW root .htaccess, before #14

    RewriteCond %{REQUEST_URI} ^\/index\.php [NC]
    
    # use this if you have digits and/or strings
    RewriteCond %{QUERY_STRING} ^id=(.+) [NC]
    
    # use this i you have only digits [0-9]
    # RewriteCond %{QUERY_STRING} ^id=(\d+) [NC]
    
    RewriteRule ^ /index_php/%1? [R,L]

    As @Mike Rockett pointed out, the jumplink has to be:

    source:index_php/{all}
    destination:{all|mymap}
    
    // or if you have only digits:
    source:index_php/{id}
    destination:{id|mymap}

    … and the mapping with the name "mymap":

    123=impressum
    agb=agb

    Thats all.

    • Like 2
  10. In most cases when I clone an item (no matter if it's a repeater or a repeater matrix) i'd like to have the "copy" just below the "original" instead at the bottom of the repeater(matrix) field… Especially when there are many items, I have to drag around the cloned item to put it in the right place.

    I guess there should be just one checkbox in the specific repeater(matrix) field like: "Put cloned items just after the original item instead at the bottom."
    This way everyone could set up the field as he likes. This would expand ProcessWires flexibility.

    A different approach could be having 2 cloning icons at every item: one for "clone below", and one for "clone at bottom". This would be even more versatile.

    • Like 1
  11. Sometimes there are a lot of images in an image field and I want to delete them at once. I would be nice to have an additional button that toggles the delete status of every image in that image field. So I don't have to click x times on every single image in that field.

  12. On 5/3/2020 at 3:30 PM, Mike Rockett said:

    @2hoch11 - Thanks. So the reason for the redirect is to take the page away from index.php so that it isn't seen as the home page. You simply need to change the source to index_php/{id}.

    @Mike Rockett Great! Thank you! Of course, because there is the redirect in the HT Access file... and this happens BEFORE jumplinks is redirecting…

    But! I still have no redirect when I input
    www.domain.de/index.php?id=agb
    I still get the homepage instead of /agb/

    I tried to change the destination to {all|mymap} but still no result… as I can read in the documentation "id" has to be a number… but I have a string…

×
×
  • Create New...