Templates

How can I tell users how to link to my blog with link code?

Scenario:
"I want to give my readers a simple link code to link to my blog items. How can I do this without installing a plugin?"

Solution:
It is quite simple! You can use link code in both your Item Template and your Item Page Skin Part (see "What is the difference between a skin and a template?").

Item Template use
In the template you use to display your Item Pages, simply put this code somewhere in the Item Footer section:

To link to this page, please use the following url:
<input value='<a href="<%itemlink%>"><%title%></a>'></input>

Item Page Skin use
In the Item Page skin part of your current skin, simply put this code where you want the link code to appear. It is suggested you place it underneath the <%item(templatename)%>:

To link to this page, please use the following url:
<input value='<a href="<%itemlink%>"><%itemtitle%></a>'></input>

Original forum threads (thanks, ftruscot!):
http://forum.nucleuscms.org/viewtopic.php?t=12980
http://forum.nucleuscms.org/viewtopic.php?t=14891

section: Templates | submitted by Leng on 2006.Aug.12 | 2465 views

item rate
Total votes: 2 - Rating: 2.50

Please tell us how useful this answer was to you (0 = useless, 10 = very very helpful):

10