1

I am trying to make edit entry link using this idea in user guide bellow

http://ellislab.com/expressionengine/user-guide/templates/globals/single_variables.html#cp-session-id

but {cp_session_id} variable is not rendering in the page, any ideas ?

{if logged_in_group_id == "1" OR logged_in_group_id == "2" }• Edit This{/if}

1

The problem might be the S=0 part. That does only work if you have control panel security set to cookie only. By default the CP is set to Session_id too. For session_id to work with "edit" links from the front-end, you currently need to get the fingerprint / session_id with a little add-on (or with PHP, which i'm not a fan of in templates).

Here is a small plugin i created and use for this
https://gist.github.com/GDmac/8095086

(edit: issue is accepted, but is not in current EE.
https://support.ellislab.com/bugs/detail/19501
with php in template work-around)

2
  • totally fix my problem and safe my day :) thanks allot GDmac – Akwad Net Dec 23 '13 at 20:58
  • the most easy fix is to set cp to cookie only :-) – GDmac Dec 23 '13 at 21:44
1

It's possible you are logged into the control panel at www.domain.com/system/ and looking at the front-end of the site using domain.com (without www). If this is the case, EE doesn't consider you "logged in". You can change this in two ways...


Force either www.domain.com or domain.com in the htaccess file

`RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC]   
 RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]`

Then log into the control panel again if needed.


Set the cookie domain in the EE CP to .domain.com... (change domain.com to your domain)

1
  • I would like to thank you for your help I did all changes you told me, but Unfortunately, it did not work for me . in my case I have to log-in every time I need to edit any entry. :( – Akwad Net Dec 23 '13 at 0:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.