polarracing
Forum Replies Created
-
Forum: Plugins
In reply to: [Custom Content Shortcode] Count Loop with Repeater FieldNot sure if your code
[calc]total=total+1[/calc]
could work, but I would use this for calculating a counter.
[set total][calc][get total] +1[/calc][/set]
- This reply was modified 4 years, 6 months ago by polarracing.
Forum: Plugins
In reply to: [Custom Content Shortcode] Save Individual Repeater Rows (?) its Own VariableWell, your approach tries to get a field with the complete MYLSIT content.
Your intend is to get a field with the split part of mylist.
So you would have to change your code
[set myitem][format split="," part={MYCOUNTER}][get mylist][/format] [/set] [pass vars] [field {MYITEM}] [/pass]
- This reply was modified 4 years, 6 months ago by polarracing.
- This reply was modified 4 years, 6 months ago by polarracing.
Forum: Plugins
In reply to: [Custom Content Shortcode] Save Individual Repeater Rows (?) its Own VariableHere is your code line fixed.
[format split="," part={MYCOUNTER}][get mylist][/format]</td></tr> [/pass]
Forum: Plugins
In reply to: [Custom Content Shortcode] Save Individual Repeater Rows (?) its Own VariableI know that you have a variable called MYLIST. Read my answer. Its the word field in your code that is wrong.
READ MY LAST COMMENT!
You do not have a
[field {MYLIST}]
– in your case its a variable and should be called with[get mylist]
- This reply was modified 4 years, 6 months ago by polarracing.
- This reply was modified 4 years, 6 months ago by polarracing.
Forum: Plugins
In reply to: [Custom Content Shortcode] Save Individual Repeater Rows (?) its Own VariableNot sure what you mean.
This code:
[set mycount]2[/set] [field firstname] [pass vars] [format split="," part={MYCOUNT}][field firstname][/format][/pass]
Returns this:
Myown, Firstname -> content of field [field firstname] Firstname -> Part 2 of [field firstname]
Your issue is, that you call a field you do not have.
[format split="," part={MYCOUNTER}][field {MYLIST}][/format]</td></tr> [/pass]
You do not have a
[field {MYLIST}]
– in your case its a variable and should be called with[get mylist]
- This reply was modified 4 years, 6 months ago by polarracing.
- This reply was modified 4 years, 6 months ago by polarracing.
- This reply was modified 4 years, 6 months ago by polarracing.
Forum: Plugins
In reply to: [Custom Content Shortcode] Save Individual Repeater Rows (?) its Own VariableThis might be also of interest.
[pass list=2012,2013,2014,2015]
Year: {ITEM}
[loop type=gallery year={ITEM}]
..
[/loop]
[/pass]See: https://www.ads-software.com/support/topic/use-for-each-to-group-post-by-year/
This plugin does so much more than it is written in the documentation.
- This reply was modified 4 years, 6 months ago by polarracing.
Forum: Plugins
In reply to: [Custom Content Shortcode] Save Individual Repeater Rows (?) its Own VariableYou find it by searching split in this forum.
[format split=":," part=1][field location][/format]
The parameter split is for “delimiters”, characters where the given string will be split. The parameter part displays a part of the split string, starting with 1.
- This reply was modified 4 years, 6 months ago by polarracing.
Forum: Plugins
In reply to: [Custom Content Shortcode] Save Individual Repeater Rows (?) its Own VariableTry this.
[set mycount]0[/set]
[repeater products]
[if var=mycount value=’0′]
[set mylist][field product_name][/set]
[set mycount]1[/set]
[else]
[set mylist][mylist], [field product_name][/set]
[/if]
[/repeater]
[get mylist]Mycount and the if-clause should set a proper beginning of the list – no comma at the beginning if [mylist] is still empty.
But again, currently I have the impression you try to achieve something that should be easier to reach, if used a proper approach.
- This reply was modified 4 years, 6 months ago by polarracing.
- This reply was modified 4 years, 6 months ago by polarracing.
Forum: Plugins
In reply to: [Custom Content Shortcode] Save Individual Repeater Rows (?) its Own VariableIt depends on what you want to do.
For examle, you can build a comma-seperated list of all values within the repater and use format split outside to get single values.
But again, depending on the final result you would like to achieve there may be better ways.
Depending what you need from the post object and what information you have – there are several ways to display the information.
But I still do not get a 100% what you are trying to do. If you like, contact me via [email protected] and we can discuss.
But you should try this.
You have to nest the repeater if you would like to have him to do things step by step. Otherways you would need to split your commalist and inject each value into the repeater2.
[-repeater product_table_columns] [field product_table_column] <<< this returns a comma list, which is fine for the table column headers we’re creating here. [set myvar]YOURVAR[/set] [/-repeater] [-repeater product_table_columns] [--repeater product_table_products] [related product_table_product] [pass vars] [field {MYVAR}] <<< Instead of part_number, this needs to return the above comma list but one at a time so we can make each one a table row. [/pass] [/related] [/--repeater] [/-repeater]
- This reply was modified 4 years, 6 months ago by polarracing.
- This reply was modified 4 years, 6 months ago by polarracing.
- This reply was modified 4 years, 6 months ago by polarracing.
- This reply was modified 4 years, 6 months ago by polarracing.
- This reply was modified 4 years, 6 months ago by polarracing.
Ok, but why the related in the second repeater
If you need to replace a part of a field name with a dynamic value you can use [pass]
[set myvar]en[/set] [pass vars] [field myfield-{MYVAR}] [/pass]
gives back the content of
[field myfield-en]
- This reply was modified 4 years, 6 months ago by polarracing.
Not sure what you want to do.
You have a content type with an repeater field
called prouct_table
.
You have repeater fields within that repeater calledproduct_table_columns
andproduct_table_products
.
You have a relation field within theproduct_table_products
repeater calledproduct_table_product
.
You have a field calledpart_number
within the posts related fromproduct_table_product
You want to read the content of the the field from the related posts.Did I get it right?
- This reply was modified 4 years, 6 months ago by polarracing.
- This reply was modified 4 years, 6 months ago by polarracing.
Forum: Plugins
In reply to: [Custom Content Shortcode] orderby/order numeric not alphabeticalTry
field_num
asorderby
parameter