Edit Links

Hi,

I’m wondering if there is a simple way to determine in a template
whether or not the user is logged in as someone who can edit the
current page, and if so, show a link to the edit page in the admin
area. It strikes me as something someone may have wanted to do
before, so I thought I’d ask here first.

Thanks,

Daniel Lyons wrote:

I’m wondering if there is a simple way to determine in a template
whether or not the user is logged in as someone who can edit the current
page, and if so, show a link to the edit page in the admin area. It
strikes me as something someone may have wanted to do before, so I
thought I’d ask here first.

There is not. Currently this is because it would conflict with the way
Radiant caches pages. It should be possible to create tags for this, but
you would also need to turn caching off.


John L.
http://wiseheartdesign.com

Daniel Lyons wrote:

Interesting. I wonder if it would be possible to implement a caching
system that could take this into account.

Obviously, this isn’t a deal breaker. Back to hacking…

I’m considering adding fragment caching so that you could mark certain
sections of the page for caching and let it generate the rest.


John L.
http://wiseheartdesign.com

On Aug 17, 2006, at 8:35 PM, John W. Long wrote:

Daniel Lyons wrote:

Interesting. I wonder if it would be possible to implement a caching
system that could take this into account.

Obviously, this isn’t a deal breaker. Back to hacking…

I’m considering adding fragment caching so that you could mark certain
sections of the page for caching and let it generate the rest.

I believe, though I could be mistaken, that Typo implements this.

Incidentally, Radiant is a lot faster than Typo on my server in an
analogous configuration, though they are solving different problems
and at different levels of maturity.


Daniel

On Aug 17, 2006, at 7:46 PM, John W. Long wrote:

this, but
you would also need to turn caching off.

Interesting. I wonder if it would be possible to implement a caching
system that could take this into account.

Obviously, this isn’t a deal breaker. Back to hacking…


Daniel

John,

+1 - Fragment caching would be great!

AEM

Assuming that you don’t have any behaviors that would create a rails
session, you could embed some javascript that checks for the session
cookie and displays that link then - that would be cache-safe.


From: [email protected]
[mailto:[email protected]] On Behalf Of Daniel Lyons
Sent: Friday, 18 August 2006 10:45 AM
To: [email protected]
Subject: [Radiant] Edit Links

Hi,

I'm wondering if there is a simple way to determine in a

template whether or not the user is logged in as someone who can edit
the current page, and if so, show a link to the edit page in the admin
area. It strikes me as something someone may have wanted to do before,
so I thought I’d ask here first.

Thanks,



--
Daniel Lyons
[email protected]