solved If on Profile Index

gary.moncrieff
gary.moncrieff
@garymoncrieff
11 years ago
865 posts
Hey Guys

This might seem like a strange question, but I need a way to determine if it is the Community profiles (id=4) profile index page, and if so exclude something from showing.

So basically something like {if $_profile_id == 4 && Template=profile_index.tpl}

Is this possible, and if so what would the proper syntax be?

Thanks

Gary


updated by @garymoncrieff: 11/30/14 03:57:05AM
paul
@paul
11 years ago
4,335 posts
I think {$jr_template} tells you what template you're in, so

{if $_profile_id == 4 && $jr_template == "profile_index.tpl"}

But if this code is in the profile_index.tpl template, will not the $jr_template test always be true anyway?


--
Paul Asher - JR Developer and System Import Specialist
gary.moncrieff
gary.moncrieff
@garymoncrieff
11 years ago
865 posts
on profiles jrtemplate seems to be returning the header file
brian
@brian
11 years ago
10,149 posts
gary.moncrieff:
on profiles jrtemplate seems to be returning the header file

$jr_template will be (or should be) the name of the template it is in. So while in "header.tpl" it should be "header.tpl", etc.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
michael
@michael
11 years ago
7,805 posts
The standard way to see what you have available is to put {debug} where your planning on using the info and see what stuff is available.

"{debug}"
http://www.jamroom.net/the-jamroom-network/documentation/development/1477/debug

If what you want isn't there then you move on to one of the "how do i get this value here" ways.
gary.moncrieff
gary.moncrieff
@garymoncrieff
11 years ago
865 posts
I needed to take a step back and rethink this through. For the community profile I want a 3 col index page (col3, col6, col3) but then for other areas of the community profile (forum, docs, files, tracker) I want 2 column (9col, 3col).

So essentially the community profile index becomes a community hub of latest this and that.

After sleeping on it I seemed to have figured out a solution, amazing what your unconscious mind can achieve hey ;)
michael
@michael
11 years ago
7,805 posts
Yep, totally agree. I find sometimes the thing I was stuck on all day looks so obvious in the morning I wonder why it took me so long to see it. Not an uncommon occurrence.

Glad you got it sorted.

Tags