• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Correct way to create template modification

TheBigK

Well-known member
#1
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:

TheBigK

Well-known member
#2
...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>
 

Mr. Goodie2Shoes

Well-known member
#3
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
:)
 

TheBigK

Well-known member
#5
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
 

TheBigK

Well-known member
#6
Just in case I'm missing anything, here's the screenshot: -

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

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>
 

TheBigK

Well-known member
#7
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
 

Steve F

Well-known member
#8
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. :)