Display different code based on category

More
14 years 1 week ago #11145 by intown
Getting close to launching a nice flexi content site.

It is a site for a large corporate real estate company.

Question.

How would i write a php statement to display different code based on the flexi content category?

thinking it would be something like this:

If category 1 then display code set 1
if category 2 then display code set 2


This is probably basic php which I am starting to get a better understanding, just not sure how to display different code based on the flexi content category.

Thanks!

Steven

Please Log in or Create an account to join the conversation.

More
14 years 1 week ago #11148 by grabit
Create 2 differents templates including your code and assign it to your category.

Template 1 with code 1 to category 1 and template 2 with code 2 to category 2.

Hope this helps.

An Apple a days keeps the doctor away

Please Log in or Create an account to join the conversation.

More
14 years 1 week ago #11198 by intown
Thanks so much for the reply.

If it comes to it I may use that solution.

I was hoping to find more of a "behind the scenes solution" so that the client would have to make fewer choices.

Thanks!

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #13574 by intown
Any suggestions on displaying code based on the category?

something like

if category = 1 then display "New York"
else if category = 2 then display "Paris"
else dispaly "Sydney"

Thanks!

Steven

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.369 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline