ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Linking to CP edit page, filter by specific channel

October 17, 2011 8:14am

Subscribe [2]
  • #1 / Oct 17, 2011 8:14am

    squiid

    39 posts

    Hello!

    I’m using EE 2.2.2.

    I’m trying to create an “Edit [channel] entries” link from the front end of my site that links to the Content > Edit Page. However, instead of linking to the page showing the most recent entries across ALL channels, I would like to link to the Edit page pre-filtered by a particular channel. Is there a way I can do this via the URL, like a hash tag that maintains state of this filter? if not, do you know of any third-party add ons that would let me achieve this?

    thanks,
    Shaun

  • #2 / Oct 17, 2011 8:37am

    Sue Crocker

    26054 posts

    Hi, Shaun.

    I use something like this to build a link for each entry:

    Question: How can I add an Edit This Link in EE2?

    Answer: You can use the following snippet:

    {if author_id == logged_in_member_id OR logged_in_group_id == "1"}•
     <a href="http://{cp_url}?S=0&D=cp&C=content_publish&M=entry_form&channel_id={channel_id}&entry_id={entry_id}">Edit This</a>{/if}

    NOTE: In the example, take out the ; between entry and _id. The forum adds that.

  • #3 / Oct 17, 2011 9:52am

    squiid

    39 posts

    Hi Sue! Thanks for the response. To clarify,  I was looking for a way to link to the Edit Overview page, i.e. the list of entries in a specific channel, not a link to a specific channel entry itself. I’ve got that one down!

    In EE1 this was possible, the Edit page accepted a weblog_id param. However, in EE2,
    {cp_url}index.php?C=edit&weblog_id=4

    OK, in the process of writing this, I just answered my own question. This is possible in EE2 like this:

    {cp_url}&S=0&D=cp&C=content_edit&channel_id=4

    Many thanks 😊
    Shaun

     

     

    Many thanks!!
    Shaun

     

  • #4 / Oct 17, 2011 9:54am

    Sue Crocker

    26054 posts

    Yup.. I just had written an article on how to build a link for every item, just enough to get you started. 😊 Feel free to start a new thread if you have any more questions.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases