Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

Edit Link In An Entry (See related posts)

Without the Snippets plugin (ie, straight on the template itself):

{if member_group == "1"}
<a href="/system/index.php?C=edit&M=edit_entry&weblog_id={weblog_id}&entry_id={entry_id}" title="Edit Entry">Edit Thisa>
{/if}


With the Snippets plugin (ie, included in a seperate template that gets pulled into all other templates):

{if member_group == "1"}
<a href="/system/index.php?C=edit&M=edit_entry&weblog_id=%editweblog%&entry_id=%editweblog2%" title="Edit Entry">Edit Thisa>
{/if}


And use this to include the editlink template:

{exp:snippets template="static/editlink"}
{editweblog}{weblog_id}{/editweblog}
{editweblog2}{entry_id}{/editweblog2}
{/exp:snippets}

You need to create an account or log in to post comments to this site.


Related Posts