gregbtm

Customer
I have a custom array of coloured buttons for members to select different styles from the one they're on. I've copied the target link from the default style switcher within XF in the footer, and it appears to error out with a 404.

Code:
<div class="styleChooser">
    <ul>
        <li><span>Style Chooser:</span></li>
        <li><a href="/misc/style?style_id=10&amp;t=1591799815%2C9c76aa51f2dbeec48b573eccbd10c06d"" class="style-picker style-picker--1" data-xf-init="tooltip" data-original-title="BTM Original" id="js-XFUniqueId1">
            </a></li>
        <li><a href="/misc/style?style_id=10" class="style-picker style-picker--2" data-xf-init="tooltip" data-original-title="Blue" id="js-XFUniqueId2">
            </a></li>
        <li><a href="/misc/style?style_id=10&amp;t=1591799815%2C9c76aa51f2dbeec48b573eccbd10c06d" class="style-picker style-picker--3" data-xf-init="tooltip" data-original-title="Green" id="js-XFUniqueId3">
            </a></li>
        <li><a href="/misc/style?style_id=11&amp;t=1591799815%2C9c76aa51f2dbeec48b573eccbd10c06d" class="style-picker style-picker--4" data-xf-init="tooltip" data-original-title="Red" id="js-XFUniqueId4">
            </a></li>
        <li><a href="/misc/style?style_id=6&amp;t=1591799815%2C9c76aa51f2dbeec48b573eccbd10c06d" class="style-picker style-picker--5" data-xf-init="tooltip" data-original-title="Yellow" id="js-XFUniqueId5">
            </a></li>
        <li><a href="/misc/style?style_id=7&amp;t=1591799815%2C9c76aa51f2dbeec48b573eccbd10c06d" class="style-picker style-picker--6" data-xf-init="tooltip" data-original-title="White" id="js-XFUniqueId6">
            </a></li>
        <li><a href="/misc/style?style_id=6&amp;t=1591799815%2C9c76aa51f2dbeec48b573eccbd10c06d" class="style-picker style-picker--7" data-xf-init="tooltip" data-original-title="Yellow" id="js-XFUniqueId5">
            </a></li>
        <li><a href="/misc/style?style_id=7&amp;t=1591799815%2C9c76aa51f2dbeec48b573eccbd10c06d" class="style-picker style-picker--8" data-xf-init="tooltip" data-original-title="White" id="js-XFUniqueId6">
            </a></li>
    </ul>
</div>
Say if I use this href from the xf style switcher - https://www.behind-the-mask.net/dis...t=1593707085,678b051e3943cc15015e5913387bea93

It just errors out. Any ideas? Thanks!
 

Russ

Pixel Exit Staff
Try this link out instead:

Code:
{{ link('misc/style', null, { 'style_id': 1, '_xfRedirect': $redirect, 't': csrf_token() }) }}
Should help! Sorry for the delay, was off for the holiday weekend.
 

gregbtm

Customer
Code:
       <li><a href="{{ link('misc/style', null, { 'style_id': 1, '_xfRedirect': $redirect, 't': csrf_token() }) }}" class="style-picker style-picker--1" data-xf-init="tooltip" data-original-title="BTM Original" id="js-XFUniqueId1">
            </a></li>
So it would be like that for each 'button' ?

Thanks! :)
 

Russ

Pixel Exit Staff
Code:
       <li><a href="{{ link('misc/style', null, { 'style_id': 1, '_xfRedirect': $redirect, 't': csrf_token() }) }}" class="style-picker style-picker--1" data-xf-init="tooltip" data-original-title="BTM Original" id="js-XFUniqueId1">
            </a></li>
So it would be like that for each 'button' ?

Thanks! :)
Yep should work :), just change the 1 out for the unique style ID.

You don't need the id="js-XF..." bit either.
 

Pre-Sale Questions

If you have any questions or concerns you want to ask before you make a purchase don't hesitate to use one of our multiple support channels for your convenience.