<![CDATA[ [Tip] How to create a Multipart web page template - My Forums]]> https://forums.modx.com/thread/?thread=19671 <![CDATA[Re: [Tip] How to create a Multipart web page template]]> https://forums.modx.com/thread/19671/tip-how-to-create-a-multipart-web-page-template?page=2#dis-post-109062
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« Execution of a query to the database failed - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '>
) AND sc.published=1 AND sc.deleted=0 ) »
      SQL: SELECT DISTINCT sc.* FROM `modx`.modx_site_content sc LEFT JOIN `modx`.modx_document_groups dg on dg.document = sc.id WHERE (sc.id IN (47
) AND sc.published=1 AND sc.deleted=0 ) AND (sc.privateweb=0) LIMIT 1 


EDIT: Not sure what this problem was but I changed it to the way sotwell did it on her site, not using the @ binding, just made a TV, gave it access to my template, and then called it in the template. that easy. thanks sotwell for access to your manager!!]]>
goatlip Aug 16, 2006, 11:38 AM https://forums.modx.com/thread/19671/tip-how-to-create-a-multipart-web-page-template?page=2#dis-post-109062
<![CDATA[Re: [Tip] How to create a Multipart web page template]]> https://forums.modx.com/thread/19671/tip-how-to-create-a-multipart-web-page-template?page=2#dis-post-109061
So while the TVs will have default content, for every document you can edit the TV for that document.

You can browse through the manager of my site if you want to see what I mean.]]>
sottwell Aug 02, 2006, 11:49 PM https://forums.modx.com/thread/19671/tip-how-to-create-a-multipart-web-page-template?page=2#dis-post-109061
<![CDATA[Re: [Tip] How to create a Multipart web page template]]> https://forums.modx.com/thread/19671/tip-how-to-create-a-multipart-web-page-template?page=2#dis-post-109060 Quote from: xwisdom at Sep 12, 2005, 02:37 PM

Quote from: bugaev at Sep 12, 2005, 12:50 PM

Sorry, may be I had not catch something undecided, but both right- and left-side-coloumn content automaticaly displays on all pages with this 3-coloumns template. So, I can’t change the left and right columns for a specific document without affecting other documents. In order to do that I need to create another set of TVs for each document types. Please, clear this topic to me rolleyes

If you make the change from the withing the Default Value of the TV then it will affect all pages. You should only make the change from when editing the document

Okay, I just want to make sure I understand this, because I’m just starting to grasp this TV concept. Referring back to the original tuturial in the first post: The ?My Left Sidebar? and ?My Right Sidebar? documents contain the default contents of the MyLeftColumn and MyRightColumn TV’s, respectively. Therefore, left alone they contain the same content on every page in the site.
So if I wanted to change the contents on the right sidebar of one of my pages (for example: replace a menu with a chunk). I would have to create a NEW document (for example, ?My Right Sidebar 2?). And on that particular page, I change the value of the MyRightColumn TV to ?My Right Sidebar 2?
Is that what you mean? Because if I simply edit the original ?MyRightSidebar? document, it will change every page, right?]]>
blitz Aug 02, 2006, 01:51 PM https://forums.modx.com/thread/19671/tip-how-to-create-a-multipart-web-page-template?page=2#dis-post-109060
<![CDATA[Re: [Tip] How to create a Multipart web page template]]> https://forums.modx.com/thread/19671/tip-how-to-create-a-multipart-web-page-template?page=2#dis-post-109059 I’m working on a similar feature without using TVs, just a custom snippet; what I want for my side columns is content that changes automatically following the site section the visitor is browsing, for example:

HOMEPAGE
Left Column -> latest News (Ditto snippet pulling from the News Subfolder)
Right Column -> Tag cloud (another snippet configured on document keywords)

ACTIVITIES
Left Column -> sub-nav list of arguments (DropMenu snippet from the Activities submenu)
Right Column -> Related arguments (ListRelated snippet)

PROJECTS
Left Column -> some other specific Chunk
Right Column -> more stuff saved in a chunk
...

The side columns are not directly editable as with TVs, but still this gives a very dynamic site, all managed with a single template. There ’s really no limit to each column content you can have multiple calls to different snippets; and/or calls to Chunks and TVs for each section.

The Snippet php code is pretty simple: starting from the current doc ID I reconstruct its position in the site document tree; then I just have an if-block that returns different chunks or Snippet calls by matching the docID and parentID with the sections IDs.

Inside the HTML template I have one call to the snippet from each side column; I do pass the column value (left, right) as an argument in the snippet call, but one can also create a specific Snippet for each column to avoid passing this argument (de gustibus).

I’m using the same technique with another Snippet that takes care of the header: the site is going to be bi-lingual thus in the root level I have 2 folders, one for english and one for italian docs; this snippet checks if the current doc is in one folder or the other and loads the GUI (main navigation block) in the correct language.

]]>
lukwe Jun 21, 2006, 04:12 AM https://forums.modx.com/thread/19671/tip-how-to-create-a-multipart-web-page-template?page=2#dis-post-109059
<![CDATA[Re: [Tip] How to create a Multipart web page template]]> https://forums.modx.com/thread/19671/tip-how-to-create-a-multipart-web-page-template?page=2#dis-post-109058 Thanks smiley]]> davidm Jun 20, 2006, 05:20 PM https://forums.modx.com/thread/19671/tip-how-to-create-a-multipart-web-page-template?page=2#dis-post-109058 <![CDATA[Re: [Tip] How to create a Multipart web page template]]> https://forums.modx.com/thread/19671/tip-how-to-create-a-multipart-web-page-template?page=2#dis-post-109057
Use something like this:

<div id="right-column">
[*right-column*]
</div>
<div id="left-column">
[*left-column*]
</div>


Now you are able to input separate content for every page you have. And if you want to make them editable by QuickEdit, then prefix "#" to tv name e.g. [*#right-column*]

Hope it helps.]]>
zaigham Jun 20, 2006, 07:27 AM https://forums.modx.com/thread/19671/tip-how-to-create-a-multipart-web-page-template?page=2#dis-post-109057
<![CDATA[Re: [Tip] How to create a Multipart web page template]]> https://forums.modx.com/thread/19671/tip-how-to-create-a-multipart-web-page-template#dis-post-109056
-Thanks for your help.

]]>
moimismo Jun 20, 2006, 06:38 AM https://forums.modx.com/thread/19671/tip-how-to-create-a-multipart-web-page-template#dis-post-109056
<![CDATA[Re: [Tip] How to create a Multipart web page template]]> https://forums.modx.com/thread/19671/tip-how-to-create-a-multipart-web-page-template#dis-post-109055 Quote from: bugaev at Sep 12, 2005, 12:50 PM

Sorry, may be I had not catch something undecided, but both right- and left-side-coloumn content automaticaly displays on all pages with this 3-coloumns template. So, I can’t change the left and right columns for a specific document without affecting other documents. In order to do that I need to create another set of TVs for each document types. Please, clear this topic to me  rolleyes

If you make the change from the withing the Default Value of the TV then it will affect all pages. You should only make the change from when editing the document]]>
xwisdom Sep 12, 2005, 09:37 AM https://forums.modx.com/thread/19671/tip-how-to-create-a-multipart-web-page-template#dis-post-109055
<![CDATA[Re: [Tip] How to create a Multipart web page template]]> https://forums.modx.com/thread/19671/tip-how-to-create-a-multipart-web-page-template#dis-post-109054 Quote from: xwisdom at May 27, 2005, 10:16 PM

The cool thing about this design is that we can easily change the left and right columns for a specific document without affecting other documents or having to create new template smiley
Sorry, may be I had not catch something undecided, but both right- and left-side-coloumn content automaticaly displays on all pages with this 3-coloumns template. So, I can’t change the left and right columns for a specific document without affecting other documents. In order to do that I need to create another set of TVs for each document types. Please, clear this topic to me  rolleyes]]>
bugaev Sep 12, 2005, 07:50 AM https://forums.modx.com/thread/19671/tip-how-to-create-a-multipart-web-page-template#dis-post-109054
<![CDATA[Re: [Tip] How to create a Multipart web page template]]> https://forums.modx.com/thread/19671/tip-how-to-create-a-multipart-web-page-template#dis-post-109053 tipolito Jun 23, 2005, 06:46 AM https://forums.modx.com/thread/19671/tip-how-to-create-a-multipart-web-page-template#dis-post-109053