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.

Need client to able to easily edit content pieces in brochure style layout

March 31, 2011 1:24pm

Subscribe [2]
  • #1 / Mar 31, 2011 1:24pm

    webartisan

    5 posts

    I have a site that has several, highly designed, pages. I want the client to be able to edit some of the individual paragraphs and blocks of text in these pages. I don’t want them to have to open modify the template file directly.

    Is the are a good way to designate parts of a template as editable blocks of content? Ideally an edit link would appear next to each content piece when the client is logged in.

    Any ideas?

  • #2 / Mar 31, 2011 3:40pm

    fensterbaby

    289 posts

    Here’s what I do.

    I have a snippet called {btn_edit} which contains the following

    {if (group_id == '1' OR group_id == '6' OR group_id == '8' ) && logged_in}
    <span class="edit_btn"><a href="http://{site_url}/SYSTEM/index.php?S=0&D=cp&C=content_publish&M=entry_form&channel_id={channel_id}&entry_id={entry_id}class=imgLink">_/images/btn_edit.png</a></span>{/if}


    Just change SYSTEM to the name of your system folder.

    Then put the {btn_edit} tag in a good spot on the page.

    In the above example this edit button will only appear if you are a member of group 1, 6 or 8 and are logged in. My example uses a graphic but you can simplify to just a text link of course.

    The link will take you into the CP to the entry form. This exposes all fields in that form of course.

    Put the tag once for each channel entry chunk not for each element.

    If you want to give access to just one field then you’ll have to go the SAEF route. I haven’t done that yet.

    If you just have a block of text that’s not a channel entry then you could use a global variable instead of putting text directly in a template… which should be avoided.

    hope this helps

  • #3 / Mar 31, 2011 5:05pm

    webartisan

    5 posts

    So you create these content blocks as entries and you place the edit link inside the exp:channel:entries tag on your template?

    Do you then place several of these exp:channel:entries tags in the page template and have each one set to show a single entry by ID?

  • #4 / Apr 01, 2011 2:36pm

    fensterbaby

    289 posts

    Sounds like you’re just getting started with EE.

    I highly recommend Ryan Irelan’s excellent series of video tuturials on EE.

    The documentation on EE pretty much sucks. These videos will save you a lot of time and shorten the learning curve.

    In terms of the edit buttons I mentioned, you would just add one of those for each channel entry tag set not each field.

    Greg

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

ExpressionEngine News!

#eecms, #events, #releases