Jump to content
Sign in to follow this  
jonasborg

Resolved: Category driven hdrTitle

Recommended Posts

I would like to change the detail_in hdrTitle depending on the Category value. I realize on new you will need to display something, but can you leverage the category to conditionally change the hdrTitle value? I see it (if statement on hdrTitle) has been done in list_cnt but cannot seem to make it happen on detail_in using args.category.

Thanks for any insight.

Edited by jonasborg

Share this post


Link to post
Share on other sites

Add in detail_in.htmpl something like:

<PDM_IF "${args.category.sym} == "MY_CATEGORY_NAME" >
var hdrTitle = 'My New Title';
<PDM_ELSE>
  // default code here.
</PDM_IF>

Replace the default 'hdrTitle' assignment with the code above and see if it works.

Edited by Mitu

Share this post


Link to post
Share on other sites

Thanks Mitu. Had to close the quotes on args.category.sym, but it works. Not really sure what I was missing before, as I thought I had tried this format.

<PDM_IF "$args.category.sym" == "MY_CATEGORY_NAME">

var hdrTitle = "$args.ref_num IF Detail";

<PDM_ELSE>

var hdrTitle = "$args.ref_num ELSE Detail";

</PDM_IF>

Edited by jonasborg

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...