Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter lwbenso

    (@lwbenso)

    I figured out a work around. The key was to change the order of the code so I wasn’t inserting any shortcode inside the title. So, basically the working code looks like this:

    [msdyncrm_twig]{code to pull in the count}[toggle title="Accountable Care Organizations (  {displaycountvariable} )" iconColor="rgba(23,199,210,1)" titleSize="21"]
    Example org 1
    Example org 2
    Example org 3
    [/toggle][/msdyncrm_twig]
    • This reply was modified 8 years, 3 months ago by lwbenso.
    Thread Starter lwbenso

    (@lwbenso)

    Not to dissent too much, but I’ve found one promising Google result. Though I’m having a hard time locating the code for the toggle function. Please see below and give me your thoughts

    https://wordpress.stackexchange.com/questions/260681/how-can-i-insert-a-shortcode-in-the-title-tag-of-another

    https://codex.ww.wp.xz.cn/Shortcode_API
    https://stackoverflow.com/questions/21913964/php-wordpress-shortcode-with-image?rq=1

    • This reply was modified 8 years, 3 months ago by lwbenso.
    • This reply was modified 8 years, 3 months ago by lwbenso.
    Thread Starter lwbenso

    (@lwbenso)

    Hi @sterndata

    I did not write the shortcode myself. The [toggle] shortcode I believe is from the wp theme (“Striking MultiFlex & Ecommerce Responsive WordPress Theme”) and the [twig] shortcode is part of the AlexaCRM wp plugin

    • This reply was modified 8 years, 3 months ago by lwbenso.
    • This reply was modified 8 years, 3 months ago by lwbenso.
    Thread Starter lwbenso

    (@lwbenso)

    Hi George @alexacrm,

    Thank you for the response. I tried using the template mentioned above and am receiving an error:

    Unexpected error: Unexpected character "&" in "template_57e169ff5c09571f45b7ac817c71e5f5f35d5440" at line 26.

    This is the code that I used:

    [msdyncrm_twig]
    {% view entity="account" name="CompletedAccounts" lookups={ "parentcustomerid": params.account }  cache="PT30M" %}
    {% spaceless %}
    {% if entityview.first_page is not null %}
    <table class="{{ tableClass ?? [ 'table' ]|join( ' ' ) }}">
        <thead class="{{ tableHeaderClass ?? []|join( ' ' ) }}">
        {% block headRow %}
            <tr>
            {% for columnName, column in entityview.columns %}
                {% block headCell %}<th>{{ column.name }}</th>{% endblock %}
            {% endfor %}
            </tr>
        {% endblock %}
        </thead>
        <tbody>
        {% for record in entityview.rows %}
            {% block bodyRow %}
                <tr>
                    {% for columnName in entityview.columns|keys %}
                        {% block bodyCell %}<td>{{ record[columnName].formatted_value|raw }}</td>{% endblock %}
                    {% endfor %}
                </tr>
            {% endblock %}
        {% endfor %}
        </tbody>
        {% if entityview.pages|length > 1 %}
        <tfoot>
        <tr>
          <td colspan="{{ entityview.columns|length }}">
            <nav>
              <ul class="pagination">
                <li class="page-item{% if entityview.previous_page is null %} disabled{% endif %}"><a class="page-link" href="{% if entityview.previous_page %}{{ request.url|add_query('viewPage', entityview.previous_page)}}{% else %}#{% endif %}">Previous</a></li>
                {% for pageNumber in entityview.pages %}
                <li class="page-item{% if pageNumber == entityview.page %} active{% endif %}"><a class="page-link" href="{{ request.url|add_query('viewPage', pageNumber) }}">{{ pageNumber }}</a></li>
                {% endfor %}
                <li class="page-item{% if entityview.next_page is null %} disabled{% endif %}"><a class="page-link" href="{% if entityview.next_page %}{{ request.url|add_query('viewPage', entityview.next_page)}}{% else %}#{% endif %}">Next</a></li>
              </ul>
            </nav>
          </td>
        </tr>
        </tfoot>
        {% endif %}
    </table>
    {% else %}
        {% block noRecords %}
            <p>No records found.</p>
        {% endblock %}
    {% endif %}
    {% endspaceless %}
    
    {% endview %}
    [/msdyncrm_twig]
    • This reply was modified 8 years, 3 months ago by lwbenso.
Viewing 4 replies - 1 through 4 (of 4 total)