I’m not new to CMS’s but I am new to MODx.
I just created a site but the way templates work doesn’t seem to work the same as say something like OpenRealty.
I’m interested in creating a template and then locking parts of the template with the idea of having only subsections within a template available for editing.
I don’t know if how I’m stating it is coming through correctly so I’ll try another way.
I’d like to have a template that carries over to every page (duh).
Within the template I’d like to have a section where I can put a tag like <editable content goes here></editable content goes here>
I’d like to then have a subsection within the manager where I’d create a new page; the content I write on that page will automatically go into the said tags. This is how OpenRealty works and it works really well for the end-user (which is the reason I need this capability).
Is this available... am I missing something. How does MODx handle template use by default? I have read all tutorials and searched the forum.
-
☆ A M B ☆
- 24,524 Posts
That’s what TVs are for. They can be used in a number of ways. The TV itself can be restricted, and/or you can use @DOCUMENT bindings to use given documents as the output of the TV and the documents can be restricted.
Chunks and snippets can be restricted to only the main "admin" user, but are not as flexible; they cannot be assigned to specific document groups as TVs can be.
Thanks for the response.
So I see that I can use [*content*] to insert a piece written within the document editor into the template.
I’m confused though as to how I can specify which document goes into which page.
Say I have two documents - abba and babba which are abba(1) and babba(2). Does this mean that abba is automatically a php link with an id of 1 and babba with an id of 2?
It also seems that TV’s are meant more for content outside of the template and not within it - correct?
-
☆ A M B ☆
- 24,524 Posts
Yes, each document becomes index.php?id=x, where x is the ID of the document. This gets rewritten to use the document’s alias if the system is set up to do so.
TVs can be used anywhere. I often use them in my templates to contain the content for left and right columns, since they are editable on a document-by-document basis. Or they can be used in chunks, or in the document content. Snippets can even use code to find out the content of a TV, either the default or what any given document has set it to. They are often used as option values in snippet calls:
[[MySnippet? &option=`[*mytv*]`]]
TVs are just enhanced document variables, use them exactly as you would [*pagetitle*], [*id*], [*content*], or any other document variable.
I’m new to MODx as well... not even a week yet. I’m just beginning to really get (I think, I hope) a grasp on TVs... at least theory, still working on the actual implementation.
I think the first thing to do is divorce yourself from and toss out the window any notions of what TVs are. The most logical understanding is that they are sidebar content... blocks, modules, or whatever other CMS terminology you are familiar with-- but they are so much more, that I think it is easy to get a "too narrow" view of what they can do.
Like those typical sidebar items, they can be used to repeat content automatically on different pages (though they still needn’t be restricted to the sidebars) but they can also be fine-tuned for specific content on a specific page.... so as complex or as simple as need be.
|
Identity Developments delivers SEO focused web design and web presence services
- it's not about websites, it's about your identity. |