Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8751723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:06:12+00:00 2026-06-13T13:06:12+00:00

I wanted to know what is the right syntax on a conditional statement way

  • 0

I wanted to know what is the right syntax on a conditional statement way to check if a Resource used is static or Document? I have a single template that can be used with 2 different types of resource.

So the conditional statement might be like this:

[[+template:is=static:then=This is static resource:else=This is
document resource
]]

Anyone knows how to do it in MODx? I’m using MODx revolution latest version.

Thanks 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T13:06:13+00:00Added an answer on June 13, 2026 at 1:06 pm

    you want to check the [[*class_key]] variable of the resource in question.

    [[+class_key:is='modDocument':then='This is document resource']]
    

    you also have modWebLink & modSymLink, I don’t know what the static resource is ~ at a guess modStatic?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just wanted to know something about signed vs unsigned interpretation. Am I right if
Wanted to know if there was a way one could query shelveset details from
Right now I'm learning about the CakePHP framework, and I just wanted to know
I'm learning TDD (in Javascript), and I wanted to know, what is the right
I wanted to know if theres a way to send a JSON data along
I wanted to know if there's a way to add some sort of image
I wanted to know if anyone could point me in the right direction for
I wanted to know how to use the template for an Empty Visual C++
i wanted to know if there is a way where an UIImage moves based
Hi I wanted to know if this approach is right, or what should be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.