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

Pages, but with template conditionals?? How to?

Rob

Well-known member
#1
Hi,

On my existing site (vb) I have what we call sponsor profiles. These are just pages with information about the sponsor, twitter and facebook widgets etc. On vB, I accomplished this with a basic php page to pull the content from specific templates set up in the admin area.

Now, on xenForo I would like to use the pages functionality, however, some sponsor profiles need template conditionals to show/hide content to members and non members.

My question is, whats the best way of achieving this on xenForo? I would like to pull the content from templates so I can use the template conditionals but I don't know how to go about that. I would assume it is impossible to use conditionals in 'pages' so the templates way seems the best way.

I was trying to avoid having to create a new php file each and every time I want to add a sponsor profile and I was also hoping I could set a route for each page too...

Does anyone have any ideas?
 

Brogan

XenForo moderator
Staff member
#2
Pages support HTML and XenForo syntax, so you can use conditional statements.

Or you can do it using templates.

Either approach works.