• Resolved pherbio

    (@pherbio)


    Per your instructions, I created my own theme by copying the gamma theme and placing it in my all-in-one-event-calendar\public\themes-ai1ec\THEME_NAME\twig folder.

    I select my custom theme name from the Calender Themes section and activate it.

    I’m trying to make a very simple change to the agenda-widget.twig file to change the link surrounding the date section. Code looks like this:

    <{{ tag_for_days }} class="ai1ec-date-title ai1ec-load-view" href="{{ event.permalink | e('html_attr') }}">
    <div class="ai1ec-month">{{ date | month }}</div>
    <div class="ai1ec-day">{{ date | day }}</div>
    <div class="ai1ec-weekday">{{ date | weekday }}</div>
    {% if show_year_in_agenda_dates %}
    <div class="ai1ec-year">{{ date | year }}</div>
    {% endif %}
    </{{ tag_for_days }}>

    Nothing changes.

    In fact, I’ve gone and removed all text in the file and put “Hello World” in there, and nothing changes.

    I’ve switched back and forth between themes thinking that would fix the problem, but unfortunately nothing seems to do the trick.

    I’m trying to modify the Agenda that displays on the side panel. Am I modifying the wrong twig file?

    https://www.ads-software.com/plugins/all-in-one-event-calendar/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter pherbio

    (@pherbio)

    I’ve come to the conclusion that it is the correct file AND I’m cached. I tried changing to debug mode and turning off caching, but that gave me a memory error. So, I ultimately found the twig cache directory and started manually deleting files. That seems to have done the trick as far as me seeing my updates.

    One question does remain though…

    If I want my date section to use the same URL as the event section, shouldn’t I used this code:

    href=”{{ event.permalink | e(‘html_attr’) }}”>

    It seems to be making the href=”” when viewing the source.

    Thank you pherbio, I was having the same problem and this got it working.

    Okay so I’m having to do this after every single change… I hope there is a better way or this plugin will just be too inefficient to continue using.

    In case anyone else has this problem, it has to do with Step 1 of creating a child theme: Turning on Debug Mode. The documentation doesn’t specify what exactly to do, so I had unknowingly not fully executed this step.

    You will need to change the true/false values of the following located in app > config > constants.php to the following:
    ‘AI1EC_DEBUG’, true
    ‘AI1EC_CACHE’, false
    ‘AI1EC_DISABLE_FILE_CACHE’, true

    *changing debug to true doesn’t actually effect the cacheing issue this thread focuses on, though it will spit out all the debugging jargon at the end of your page. obviously.

    DEBUG mode requires much more memory as it needs to recompile everything so it might happen that you run out of memory.

    I don’t understand exactly what you are trying to achieve, can you provide an example?

    Not sure about the original thread author, but I was simply trying to make changes to twig files of my custom theme and none of them were showing up. Turning the cache off has it working.

    Sorry, hadn,’t seen your comment. In theory this shouldn’t happen so i opened a issue in our tracker. We should probably add a “developer mode” to the plugin to allow easier development.

    Please remember that setting AI1EC_DEBUG to true has huge impact on performance. Huge. Could be 3 or more seconds on each load. Also file caching is more efficient than DB caching.

    Thread Starter pherbio

    (@pherbio)

    Glad I could help you out pixeloco….

    However, my question still remains unanswered:

    If I want my date section to use the same URL as the event section, shouldn’t I used this code:

    href=”{{ event.permalink | e(‘html_attr’) }}”>

    It seems to be making the href=”” when viewing the source.

    ^^^This is for the agenda-widget.twig

    Ok i think i understood now @pherbio. You can use

    {{ event.permalink | e('html_attr') }}

    only in the event loop. It’s not accessible outside of the loop. Look at the image https://take.ms/5lZDO

    That’s because a a single date can have many events on the same day

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Theme changes not updating’ is closed to new replies.