Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"Edit this page" snippet
#1
Insert this code snippet wherever you want in your template:

Code:
<?php if (cookie_check()) { ?>
<a href="<?php get_site_url();echo $GSADMIN;?>/edit.php?id=<?php get_page_slug();?>">Edit this page</a>
<?php } ?>

You'll have an "Edit page" link in frontend pages if you're logged in. For GetSimple 3.1+

(Of course you can customize how the link is rendered by editing the non-php part...)

Update: To use in a component, the code would be:
Code:
<?php if (cookie_check()) { ?>
<a href="<?php get_site_url();global $GSADMIN;echo $GSADMIN;?>/edit.php?id=<?php get_page_slug();?>">Edit this page</a>
<?php } ?>
Reply


Messages In This Thread
"Edit this page" snippet - by Carlos - 2012-03-24, 05:31:40
RE: "Edit this page" snippet - by lukoie - 2013-03-31, 09:54:02
RE: "Edit this page" snippet - by shawn_a - 2013-04-01, 00:38:43
RE: "Edit this page" snippet - by bigthanks - 2015-12-04, 08:55:06
RE: "Edit this page" snippet - by Carlos - 2015-12-04, 16:50:19
RE: "Edit this page" snippet - by bigthanks - 2015-12-04, 21:22:37



Users browsing this thread: 1 Guest(s)