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.

providing a raw template for new entries

December 29, 2007 2:45pm

Subscribe [4]
  • #1 / Dec 29, 2007 2:45pm

    Kerim Satirli

    52 posts

    I would very much like to standardize the way content is submitted into my EE system and so I was wondering if there is some sort of “good practice” as far as that goes, something along the lines of a “raw template”.

    my idea would be:

    1.) user clicks the publish tab and is asked to specify a template, like: review, preview, something else

    2.) template content is loaded into the text area

    3.) user can then edit the rest of the entry as needed.


    while going through the forums I did not find anything similar but that doesnt have to mean that there is nothing here…

    any thoughts?

  • #2 / Dec 29, 2007 3:07pm

    jeremydouglas

    292 posts

    In EE the general way of doing things is content is entered into a weblog and then templates pull that content into your website. So, you can create a different weblog for each section you were thinking of like you said “review, preview, something else”.

    Content submitters don’t need to worry too much about templates.

    Or, if I misunderstood you, are you looking for some text to be loaded into the textarea automatically? There may be an extension around for that, I’m not sure of one off hand.

  • #3 / Dec 29, 2007 3:20pm

    Kerim Satirli

    52 posts

    Or, if I misunderstood you, are you looking for some text to be loaded into the textarea automatically? There may be an extension around for that, I’m not sure of one off hand.

    that is exactly what I am looking for 😊

  • #4 / Dec 29, 2007 4:19pm

    Boyink!

    5011 posts

    What kind of text are you looking to be filled in?  Do you expect your admins to modify it?

    For text that isn’t expected to change, I’d look to put that in via a template vs. in the CP.

    For shorter things you could make use of the HTML Formatting buttons:
    CP Home >  My Account > Weblog Settings >  HTML Formatting Buttons

    Or how about a drop-down custom field where you supply the options they can choose?

    Or - maybe a relationship field to another weblog where you setup entries with the proper text?

  • #5 / Dec 29, 2007 5:20pm

    Kerim Satirli

    52 posts

    What kind of text are you looking to be filled in?  Do you expect your admins to modify it?

    the text would basically be something like:

    Title: Getting Things Done: The Art of Stress-Free Productivity
    Author: David Allen
    Blurb: Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

    Now, if every entry would be limited to a max of one such snippet, this would work well with fields, but that is not the case.

    For text that isn’t expected to change, I’d look to put that in via a template vs. in the CP.

    I thought about that too, main problem is that the text consists of approx 10 different snippets, with an unlimited number of snippets per entry, so the template approach would not work too well either.

    For shorter things you could make use of the HTML Formatting buttons:
    CP Home >  My Account > Weblog Settings >  HTML Formatting Buttons

    This might work, but there’s still a problem with snippets that are supposed to span across multiple lines. The inserted code is all put onto one line, even with \r \n line endings.

    if this would be easy to fix, then the button approach would be the best solution.

    Or how about a drop-down custom field where you supply the options they can choose?

    as far as I know, the content of custom fields is not inserted into the text area ( {body} in the templates) and this would further complicate the whole thing.

    Or - maybe a relationship field to another weblog where you setup entries with the proper text?

    I will have to look into this one, because I really do not know how this would (have to) work.

    Thank you very much for the extensive answer. I’ll pursue the HTML formatting buttons approach for now

  • #6 / Dec 29, 2007 5:26pm

    Boyink!

    5011 posts

    I think the key to finding the best approach is the question - does each snippet need to be able to be modified on a per-entry/post basis?

  • #7 / Dec 29, 2007 5:42pm

    Kerim Satirli

    52 posts

    I think the key to finding the best approach is the question - does each snippet need to be able to be modified on a per-entry/post basis?

    nope. there will be a couple of snippets that will be created once and then just used for as long as there is a need for them.

  • #8 / Dec 29, 2007 5:54pm

    Boyink!

    5011 posts

    Hmm…then inserting them into the body field isn’t the best way, IMHO.

    There are couple of ways to go about this that would work better, as the snippets would be entered and stored once in EE, and pulled into to the post dynamically at the template level.  Any future edits to the snippets would be reflected in each post that used one.

    The first idea is to set them up as categories - then your editors can multi-select a variable number of them for each post.  You could use category custom fields for the Title/Author/Blurbs.

    The other idea is a dedicated weblog for them, and then assign them to a post using relationships.  But with relationships you can’t as easily do the 1:many with a variable “many” as the category approach.

  • #9 / Dec 29, 2007 6:16pm

    Kerim Satirli

    52 posts

    Hmm…then inserting them into the body field isn’t the best way, IMHO.

    There are couple of ways to go about this that would work better, as the snippets would be entered and stored once in EE, and pulled into to the post dynamically at the template level.  Any future edits to the snippets would be reflected in each post that used one.

    hmm I just saw that I forgot to save my edit for my last post. What I said was:

    The snippets are basically set in stone and are, most probably, not going to be changed once everything is set up. If there is really a need to change them, I will just manually update the entries that use them.

  • #10 / Dec 29, 2007 6:23pm

    Boyink!

    5011 posts

    Sure…but why not let EE do the heavy lifting?  😉 

    Setting up categories to serve in this manner would only take a few minutes.

    Plus - going the category route, for example, you could easily build views of all the posts that reference one book (snippet) using EE category pages.

  • #11 / Dec 29, 2007 6:39pm

    Kerim Satirli

    52 posts

    Sure…but why not let EE do the heavy lifting?  😉 

    Setting up categories to serve in this manner would only take a few minutes.

    Plus - going the category route, for example, you could easily build views of all the posts that reference one book (snippet) using EE category pages.

    correct me if I’m wrong, but wouldn’t those categories also show up in the category listing in the edit / publish section?

    Apart from the visual clutter (the users are _very_ picky), I think this might be overkill for the thing that I am trying to accomplish.

    Nonetheless, I am interested in hearing how this would work, so if you could provide me with more pointers, I am all ears 😊

  • #12 / Dec 29, 2007 6:49pm

    Boyink!

    5011 posts

    correct me if I’m wrong, but wouldn’t those categories also show up in the category listing in the edit / publish section?

    Yes.

    But - regardless of approach you’re going to need some interface widget of some sort to allow them to choose which snippet to use.

    And keep in mind that you can hide much of what appears on the CP edit tab—or even go so far as to build a standalone entry/edit form to really customize the publishing experience.

  • #13 / Dec 29, 2007 6:57pm

    Kerim Satirli

    52 posts

    Yes.

    But - regardless of approach you’re going to need some interface widget of some sort to allow them to choose which snippet to use.

    I realize that, but the buttons have a clear purpose (to new users) - you click on one and it inserts something; with categories, I’ll have to explain that, even though all categories look the same that:

    * some will insert a special snippet into the article / entry
    while
    * others will be used as “traditional” categories, for filing content

    that said, while it might not suite the bill for this project, I (and probably others too) am still curious as to how you would have done it with categories

  • #14 / Dec 29, 2007 7:27pm

    Boyink!

    5011 posts

    Well…understand I’m old database guy.  Anytime I see the same text getting stored in the database over and over the hair on my neck goes up…;)

    What I’d probably do in this case is create two category groups - one for snippets and one for the true categories.

    In the snippets category group I’d create whatever custom fields are required for the content.

    Alternatively you could still use relationships (setup a snippets weblog, each post is one snippet) then use Mark Huot’s multi-relationship extension to allow a variable number of them to be created for each post.  That approach may make more sense for your users as the relationship field would be further down the edit page and it would be separate from categories.

    Oh - make sure to read the docs on the HTML buttons especially around the defaults.

  • #15 / Dec 29, 2007 8:00pm

    Kerim Satirli

    52 posts

    Well…understand I’m old database guy.  Anytime I see the same text getting stored in the database over and over the hair on my neck goes up…;)

    oh I totally understand and know where you are coming from.

    What I’d probably do in this case is create two category groups - one for snippets and one for the true categories.

    In the snippets category group I’d create whatever custom fields are required for the content.

    interesting approach. I’ll have to look into this.

    Oh - make sure to read the docs on the HTML buttons especially around the defaults.

    thanks - I did. still missing some information, but I’ll be able to figure that out one way or another (I hope)

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

ExpressionEngine News!

#eecms, #events, #releases