Correct way to create template modification

TheBigK

Well-known member
I'm planning to use a template modification and I've done this:-

Template: member_view
Find: <xen:hook name="member_view_tabs_heading" params="{xen:array 'user={$user}'}" />
Replace: <xen:include template="profilenotes_member_profile_heading">

Or should it be:

Replace:
<xen:include template="profilenotes_member_profile_heading">
<xen:hook name="member_view_tabs_heading" params="{xen:array 'user={$user}'}" />

Is there any better / recommended way to do it?
 
Last edited:
...and for some out of the world reasons, the above does not work :(

My template:
Code:
<li><a href="{$requestPaths.requestUri}#profilenotes">{xen:phrase profilenotes_member_tab_heading}</a></li>
 
You haven't included the '/' for xen:include tag: :p
Code:
<xen:include template="profilenotes_member_profile_heading" />

And of-course you have to include what you are replacing if you don't want that part to go away :D
And for that you don't have include it twice, just use:
Code:
$0
in the Replace With textbox

so it will be something like this:
Code:
<xen:include template="profilenotes_member_profile_heading" />
$0

:)
 
Even with /> , it does not work. This is how it looks right now; but does not work:

Find: <xen:hook name="member_view_tabs_heading" params="{xen:array 'user={$user}'}" />
Replace: <xen:include template="profilenotes_member_profile_heading" /> $0
 
Just in case I'm missing anything, here's the screenshot: -

Screen Shot 2015-04-13 at 10.26.20 am.webp

This thing works absolutely fine if I simply use the replace text as the content of my template:

Code:
<li><a href="{$requestPaths.requestUri}#profilenotes">{xen:phrase profilenotes_member_tab_heading}</a></li>
 
DAMN!

The problem was with 'Style'. I created the template in the master as well as the default style - and then clicked save. -> Nothing happend.

Clicked : Save again.

Magic!

:D
 
If this is all that is in your template why not simply use it?
HTML:
<li><a href="{$requestPaths.requestUri}#profilenotes">{xen:phrase profilenotes_member_tab_heading}</a></li>

I posted that link above again to hint at looking at how it is already accomplished in the RM. :)
 
I posted that link above again to hint at looking at how it is already accomplished in the RM.
Already referred to it. The problem was that I was using a different style. I created the template across all the styles and it began working.
 
Back
Top Bottom