Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
knowing the current location

hi guys,
I'm pretty new to smarty, is there a function just like IsMobile() that knows where the page is like , IsDiscussions().
regards.
0
Comments
In 2.1, you can use
InSection()
:Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub
hi @kasperisager where can i find a documentation for "Discussion", "DiscussionList" etc. etc ? or where can i find it in smarty? this info is very helpfull.. thanks
If you check out the source of this very page, you'll find that the
body
element has the classSection-Discussion
- to target this section using theInSection()
function, you'd therefore write:It's as simple as that :-)
Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub
sweeeeeeet. thanks
@kasperisager just a followup question about this. i only have 3 of them, Section-Discussion, Section-DiscussionList, Section-Profile, i'd like to get the inbox-message section, but can't, where should i find it ?
I'm not sure how many "sections" are added in the alpha, but the latest beta version contains "sections" for every single view in Vanilla:
...and the list goes on.
Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub
.Section-PostDiscussion
InSection("PostDiscussion");
this one ddnt work on me on v21.
Which version are you using?
Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub
vanilla Version 2.1a33
i need this since i want to make a sidebar if a poster of new discussion is posting their discussion for some rules and regulations.
You'll need the latest beta to use all the "Sections" I'm afraid
Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub