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

<?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:
<?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 } ?>
thats the one! cheers mate!
You can use my component hook plugin to insert this automatically anywhere you want, front end hook wise.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
a question from a newbie:
This works well when in localhost but do not appear when online hosting. Why? (I already logged in). Please help, because this command is very helpful to me in dealing with many pages.
Try changing cookie_check() by is_logged_in() and let me know...
Solved. Apologize, it was my fault. I forgot to put get_footer (); on the template. But using is_logged_in () can be work too. Once again sorry and thank you for your time.
GS is very impressive (y)

Users browsing this thread: 1 Guest(s)