1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Force a certain style temporarily via URL

Discussion in 'XenForo Questions and Support' started by Chris D, Apr 19, 2012.

  1. Chris D

    Chris D XenForo Developer Staff Member

    Let me try to explain this without confusing the hell out of people.

    So, XenPorta and the built in "Pages" feature both contain an option to force a different style for everyone who visits those pages.

    What if you wanted to only show a different style sometimes (such as if the content is being accessed via an iFrame or similar)?

    What I'm talking about is people visiting the page normally access it via its URL, for example: http://www.valvetime.net/pages/Staff/

    But would it be possible to force a different style simply by changing the URL. for example http://www.valvetime.net/pages/Staff/?style_id=2?

    Is this possible as it is, or would I need to be looking for an add-on?
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Yorick likes this.
  3. alexD

    alexD Active Member

    You could also use my add-on for an easier UI:

    Yorick and Jake Bunce like this.
  4. Chris D

    Chris D XenForo Developer Staff Member

    Both of you are geniuses.

    I searched incredibly hard for an add on such as these two... Clearly not hard enough!

    Thank you!
  5. 0xym0r0n

    0xym0r0n Well-Known Member

    my domains just keep redirecting to my main domain and showing the default style. This is on firefox, chrome, mobile, and IPAD...

    But I was also have issues with my domains redirecting before this... I guess XF forces a redirect already but I don't see where I'd adjust that in my .htaccess as I've already written exceptions...

    setup as domainexample.us
    http:// www. reddead . us /forum /31/

    Set for all users and wildcard everything else
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You want to change the style_id too? Based on what condition? You posted a forum URL... you can edit individual forums in the Admin CP and set a custom style.
  7. alexD

    alexD Active Member

    It appears you're referring to my add-on.

    Create some new rules and play only with the URI sub-rules. Test the following ones:

    Here is the support thread. There was another user with a similar redirection problem, you may look it up.
    0xym0r0n likes this.
  8. 0xym0r0n

    0xym0r0n Well-Known Member

    I did that thing again where I have 5 tabs open related to my issue and I post on the wrong one >.>

    Thanks Jake and Alex lol
    alexD likes this.

Share This Page