Post Reply 
 
Thread Rating:
  • 342 Votes - 2.74 Average
  • 1
  • 2
  • 3
  • 4
  • 5
a million template variables?
08-18-2011, 05:49 PM
Post: #1
a million template variables?
I'm trying to learn MODx. The terms chunk/resource/snippet/TV terms are pretty frustrating.

I have a template in a resource working fairly well. I'm porting a Responsive Web Design site to MODx. It seems to work fine.

Problem is:

I feel like I'm about to make hundreds or thousands of Template Variables in order to make this editable in the Manager by non technical types. This is going be a huge mess. I am tying to assume ZERO tech ability on the part of the content editor.

My thinking is the non technical user could just open a TV and edit the content there and it will update in the site. I can't really send a marketing person into a large template, or template variable or resource and have them editing content within the HTML code. They will break it eventually.

I really feel like I'm missing something since I'm about to make hundreds of TVs for content like header titles, subheadings, content, links, images, etc.

Am I concepting this wrong?


Find all posts by this user
Quote this message in a reply
08-19-2011, 04:24 AM
Post: #2
RE: a million template variables?
schemula
It really depends on your template and what you're trying to accomplish. Very generally speaking you use template variables for content sections that you want to be editable, in other words you can consider this creating more content fields, whereas you use chunks for repeatable chunks of HTML or content. Snippets add functionality to your site, and are made of PHP code.

You can set things up so that if you have a lot of sections that will need editing by a non-technical person you can show only those sections to that person and hide everything else, so that there's not much chance of them messing up anything else.

MODX is very flexible and there is usually more than one way of accomplishing any one task.

It would be easier to give suggestions if I could see your template and get a sense of what it is you're trying to accomplish.


Find all posts by this user
Quote this message in a reply
08-19-2011, 06:05 AM
Post: #3
RE: a million template variables?
Mary,

Thanks.

It's running on a local server, but I have it set-up like this:

(I'm learning and I'm only a few hours into this, so, it would not surprise me if I'm totally wrong in my approach)

Resource: has the header, css calls, etc and the footer.

So, say I have 6 divs in a wrapper and I have them collapsing fine for the purposes of Responsive Web Design.

One div looks like this (alligator teeth removed from HTML):

H1 [[*divTitle]] /H1
p [[*divContent1]] /p
p [[*divContent2]] /p

otherwise the enduser has to insert their own p tags.

So for one simple div with a title and 2 paragraphs, I have 3 template variables? I can organize them in folders and give them nice names, but, this is going to get out of control in a hurry.

I guess I feel the need to make everything variable because the end client is assumed to have no HTML knowledge.

I also don't see a way to make the kind of backend forms that would make this easier:

edit title:_____________
edit p1:______________
edit p2:______________

I really feel like I'm approaching this wrong. And I have not even gotten into image uploading and all that.

Thanks.


Find all posts by this user
Quote this message in a reply
08-20-2011, 07:24 PM
Post: #4
RE: a million template variables?
Hmm, definitely looks like you may be overcomplicating this a tad Smile You definitely don't need a new TV for every paragraph. You can install TinyMCE rich editor and so your content editors can format the text using that, and not have to resort to adding HTML manually. The rich text editor also allows for adding images.

I will be doing a screencast next on working with an actual template and adding content so maybe that will help.

For the backend forms, what are they intended for? All the user needs to do is open the resource they want to edit and all the relevant fields will be there for them to edit.

Hope this helps. Feel free to ask if things are still unclear to you.


Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread:
1 Guest(s)

Return to TopReturn to Content