s1s2
Forum Replies Created
-
Thank you for considering my request, @kellymetal. I added my vote.
There’s a lot of friction (sign up) to submit your vote. I wonder how many votes (about all suggested features, not just this one) you guys miss because of it. But I’m digressing.
Thanks. If nobody else within the community can help, I’ll happily stay with MailChimp.
Forum: Plugins
In reply to: [Custom Content Shortcode] IF one value OR the otherIt works. Great, thank you!
Forum: Plugins
In reply to: [Custom Content Shortcode] IF one value OR the otherWhat I called “a” and “b” in my example are strings of various length out of an ACF Select field.
One of those values can be “Chair” (so no spaces) while another can be “Chaise Lounge” (so with a space in it).
My original a and be example (with your recommended syntax) actually is:
[if field=test value=“Chair”,”Chaise Lounge” compare=or][/if]
And this doesn’t works.
Forum: Plugins
In reply to: [Custom Content Shortcode] IF one value OR the otherThanks. I tried that, too, but I forgot to mention it. It doesn’t work, either.
When I do that, the output I get is a list of all test values, not just a or b.
The field “test” accepts a, b, c, d, e, and null. When I try what you suggest, I get output for a, b, c, d, e values. Only the test field with value null is not listed.
I should also mention that values a, b, etc. must be within ‘ ‘ because they contain spaces.
I don’t expect any of these things to make any difference, so this is just in case.
Forum: Plugins
In reply to: [Custom Content Shortcode] IF this OR that existsThanks, as usual. I don’t know why I’m so bad at this…
Forum: Plugins
In reply to: [Custom Content Shortcode] [repeater] inside [related] not workingThis was the convolution I was hoping to avoid. But ok, I can do that.
Thank you!
(once again, I had to figure out a way to remove the last comma from the composed list)
Forum: Plugins
In reply to: [Custom Content Shortcode] Evaluate [related] fieldsIf you close the
[related]
tag before[pass]
, the list will be composed only of 1 item. I don’t understand why. Maybe I’m doing something wrong.To work with the whole list of items, you can do two things in my tests:
1. run all code inside
[related][/related]
, if possible.
2. append each item that[related]
outputs to a variable. Then you can pass that variable as a list in the way you have shown.Regardless, now I understand how to use a variable with
[pass list=]
and this has solved this issue and many other issues I had in other situations. Thank you!p.s.: in this specific situation, I wish I could have nested
[related]
. I tried[-related]
but it doesn’t seem to work.I supposed CCS is amazing as is and I cannot ask for more.
Forum: Plugins
In reply to: [Custom Content Shortcode] Evaluate [related] fieldsHow can I pass the related output as a list? I’d love to do that, but I can’t figure out the syntax. Thanks!
Forum: Plugins
In reply to: [Custom Content Shortcode] Evaluate [related] fieldsI tried with {-ITEM} and {ITEM}, but I don’t seem to obtain the output for both items.
Forum: Plugins
In reply to: [Custom Content Shortcode] Evaluate [related] fieldsYes again.
Forum: Plugins
In reply to: [Custom Content Shortcode] Evaluate [related] fieldsYes, ITEM is another content type.
I tried the approach you suggests and it works, but only for the first item stored in acf_items.
Let’s say that acf_items links to item_A and item_B.
If I close
[related]
before the[if]
conditions as you suggest, the only item that will be evaluated will be item_A.Forum: Plugins
In reply to: [Custom Content Shortcode] CCS tags inside a Google map chartIt works perfectly. Thank you!
Forum: Plugins
In reply to: [Custom Content Shortcode] CCS tags inside a Google map chartYour #1 solution worked!
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript"> google.charts.load('current', { 'packages':['geochart'], 'mapsApiKey': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' }); google.charts.setOnLoadCallback(drawRegionsMap); function drawRegionsMap() { var data = google.visualization.arrayToDataTable([ ['Country', 'Industry Players'], [pass] [loop type=country] [set countryslug][field slug][/set] [-pass vars] [if var=total_{-COUNTRYSLUG} empty] ['[field title]', [get total_{-COUNTRYSLUG}]], [/if] [/-pass] [/loop] [/pass] ]); var options = { colorAxis: {colors:['#d9534f','#d9534f']}, legend: 'none', }; var chart = new google.visualization.GeoChart(document.getElementById('regions_div')); chart.draw(data, options); } </script> <div id="regions_div" class="worldmap"></div>
For particular reasons too long to explain, I would have preferred to save the output of the loop inside a variable and only recall that variable. But if I try to do the following, it doesn’t work:
[set maplist] [loop type=country] ... [/loop] [/set]
If the output of a loop cannot be put inside a variable, then at least I’d love to append the output of the
['[field title]', [get total_{-COUNTRYSLUG}]],
. But I don’t think that there’s any way to append strings with CCS.To solve this issue, all I had to do was wrapping the [field title] in a span (or alternative) and apply some CSS to the class to separate the values:
[related field=acf_discipline]<span class="separator">[field title]</separator>[/related]