Kami
Forum Cat
Posts: 40,187
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,187
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on May 19, 2014 12:11:19 GMT -8
No problem! If it isn't what you're looking for, please let me know. (:
|
|
JD
Full Member
Posts: 771
inherit
180643
0
Sept 27, 2024 15:01:41 GMT -8
JD
771
June 2012
obsidian92
|
Post by JD on Nov 11, 2014 15:39:20 GMT -8
Sorry to bring this up again Kami - but is there any chance you can use the above for multiples? So, for example, I'm currently using the same template above just on my boards at the moment. Can I use the above to say something like - {if $[category.name] == "Category Name" OR "Category 2 Name"} That way I don't have to write it out multiple times if the template is the same for several boards but not all of them? Many thanks for any help in advance!
|
|
Kami
Forum Cat
Posts: 40,187
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,187
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Nov 11, 2014 16:48:26 GMT -8
{if $[category.name] == "Name here" || $[category.name] == "Name Here" || $[category.name] == "Name here"}
I think ;x
|
|
JD
Full Member
Posts: 771
inherit
180643
0
Sept 27, 2024 15:01:41 GMT -8
JD
771
June 2012
obsidian92
|
Post by JD on Nov 14, 2014 11:23:15 GMT -8
That works perfectly Kami! Thank you so much!!!!
|
|
Kami
Forum Cat
Posts: 40,187
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,187
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Nov 14, 2014 13:22:10 GMT -8
|
|
JD
Full Member
Posts: 771
inherit
180643
0
Sept 27, 2024 15:01:41 GMT -8
JD
771
June 2012
obsidian92
|
Post by JD on Jan 29, 2016 7:45:56 GMT -8
Hi Kami, Sorry to randomly ask but is there a way of using the coding help you've given me in this one on individual boards? Like - {foreach $[board]}{if $[board.name] == "General Board"}THEN PUT IT HERE{/if}{/foreach} - Sort of thing? I know that I could do this and just copy and paste the board structure code each time but I was hoping I could do the board code under the Board List layout template and then just have a "input here" code for where I want each of them to go, rather than copy and pasting over and over or having to put every board inside it's own category... I hope this query made sense... :S
|
|
Kami
Forum Cat
Posts: 40,187
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,187
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Jan 29, 2016 16:42:23 GMT -8
JDIt is possible to target boards individually but you'd have to do it for each board ID rather than board name. That said you're going to run into an issue of possibly having too many 'foreach' loops. The format you'd have to follow would still be: foreach category > foreach board > if board ID, so it's entirely dependent on the number of boards you are styling. There may be a few other issues as well, but this is the one I can think of off the top of my head.
|
|
JD
Full Member
Posts: 771
inherit
180643
0
Sept 27, 2024 15:01:41 GMT -8
JD
771
June 2012
obsidian92
|
Post by JD on Jan 30, 2016 5:11:50 GMT -8
JD It is possible to target boards individually but you'd have to do it for each board ID rather than board name. That said you're going to run into an issue of possibly having too many 'foreach' loops. The format you'd have to follow would still be: foreach category > foreach board > if board ID, so it's entirely dependent on the number of boards you are styling. There may be a few other issues as well, but this is the one I can think of off the top of my head. Okay thanks Kami, Do you know at all how many would be too many for each functions? Also, what would be the code layout type using the IDs? I can give it a go and see if it wants to play ball...?
|
|
Kami
Forum Cat
Posts: 40,187
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,187
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Jan 31, 2016 18:11:37 GMT -8
JD It is possible to target boards individually but you'd have to do it for each board ID rather than board name. That said you're going to run into an issue of possibly having too many 'foreach' loops. The format you'd have to follow would still be: foreach category > foreach board > if board ID, so it's entirely dependent on the number of boards you are styling. There may be a few other issues as well, but this is the one I can think of off the top of my head. Okay thanks Kami, Do you know at all how many would be too many for each functions? Also, what would be the code layout type using the IDs? I can give it a go and see if it wants to play ball...? :) I can't recall honestly; I want to say something like 24? But I'm not 100%, you may need to ask an admin about that.
As far as the coding, if I recall it looks like this:
{foreach $[category]} {if $[category.name] == "Category One"} {foreach $[category.board]} {if $[category.board.id] == 1} Code Here {/if} {/foreach} {/if} {/foreach}
Replace the red text with the category name and board ID as required, then the 'Code Here' with whatever coding you decide to implement for that board. Theoretically, combining boards with the same style together should work similarly to combining categories with the same style together, but I'm not certain.
|
|