craft.request.getParam('entryId') returns null on edit page of an entry I have a plugin that's loaded on the edit page of an entry.

Whenever I open the entry edit page, I would like to retrieve the id of this particular entry. I've tried this:
{% set someId = craft.request.getParam('entryId') %}

But this just returns null.

I need the id because I use it in my service: craft.pluginName.getRecordByEntryId(someId).
Which will return information that's bound to that page.

I've also tried this:

{% for entry in craft.entries %}
{% if entry.id %}
    &lt;p&gt;EntryId: &lt;input type="text" value="{{ entry.id }}"/&gt;&lt;/p&gt;
{% endif %}{% endfor %}


But this will return all the entry id's, which I can't really use.

Any help or advice on how I should tackle this differently?

Thanks in advance!
craft()-&gt;request-&gt;getParam() is only going to check for the value as part of the query string in the URI or in POST if it is a POST request, which is why it's returning null on the edit entry page in the control panel (it isn't in either).

But since it looks like you're using a template hook in your plugin, you can get the entry id directly from the context:

$entry = $context['entry'];

if (!$entry-&gt;id)
{
    // New entry
}
else
{
    $entryId = $entry-&gt;id;
}