<![CDATA[ Big Noob Here, need help starting - My Forums]]> https://forums.modx.com/thread/?thread=15515 <![CDATA[Re: Big Noob Here, need help starting]]> https://forums.modx.com/thread/15515/big-noob-here-need-help-starting#dis-post-83589

  • Use different templates for different types of pages
  • Use one or more checkbox TVs with the output scripted in the TV
  • Use a snippet that checks the value of a TV, what folder a document is in, or some other flag to determine what to output
  • Use the PHx class, which would give you conditional TVs that you can write directly into your templates or content
  • Probably a half-dozen other ways...

This is one of the great things about MODx: There are almost always multiple ways to do something.

Why don’t you try one or more of these and see if you like it? If you then have specific questions about how to make something work, there are a lot of people here who will jump at the chance to help you out. When the questions are very general and covered in the basics of the documentation, however, the most efficient reply is to direct you there.]]>
ZAP Jan 24, 2007, 10:50 AM https://forums.modx.com/thread/15515/big-noob-here-need-help-starting#dis-post-83589
<![CDATA[Re: Big Noob Here, need help starting]]> https://forums.modx.com/thread/15515/big-noob-here-need-help-starting#dis-post-83588
If I were writing a CMS from scratch, I could put in IF THEN style logic to keep the redundancy down. I guess I was looking for something similar here?

Where I could put logic into a TV or something that would know which page was being pulled and what not. And perhaps all this is possible, but ModX is very big and very robust, and while I COULD read through every single piece of documentation, I assumed that the purpose of the forum was to help people get to answers when they find it in the Wiki or set of documentation.

Susan was helpful, i’m just looking for another way to do this that would require the least amount of TV, Template, Chunk, etc. creation, and relied more on conditional logic.

]]>
QManning Jan 23, 2007, 10:35 PM https://forums.modx.com/thread/15515/big-noob-here-need-help-starting#dis-post-83588
<![CDATA[Re: Big Noob Here, need help starting]]> https://forums.modx.com/thread/15515/big-noob-here-need-help-starting#dis-post-83587 ZAP Jan 23, 2007, 09:12 PM https://forums.modx.com/thread/15515/big-noob-here-need-help-starting#dis-post-83587 <![CDATA[Re: Big Noob Here, need help starting]]> https://forums.modx.com/thread/15515/big-noob-here-need-help-starting#dis-post-83586 QManning Jan 23, 2007, 07:18 PM https://forums.modx.com/thread/15515/big-noob-here-need-help-starting#dis-post-83586 <![CDATA[Re: Big Noob Here, need help starting]]> https://forums.modx.com/thread/15515/big-noob-here-need-help-starting#dis-post-83585
<h1>[*pagetitle*]</h1>
<h2>[*longtitle*]</h2>

There are also a number of site-wide values, such as [(site_name)]. These are actually taken directly from the database field names; most of them aren’t of much value for page display, but are nice to know about anyway. I often use this in my footer:

&copy 2007 <a href]"mailto:[(emailsender)]">[(site_name)]</a>


http://modxcms.com/modx-tags.html]]>
sottwell Jan 23, 2007, 01:24 AM https://forums.modx.com/thread/15515/big-noob-here-need-help-starting#dis-post-83585
<![CDATA[Re: Big Noob Here, need help starting]]> https://forums.modx.com/thread/15515/big-noob-here-need-help-starting#dis-post-83584
Question: I’ve got ’documents’, but what if i want specific things, JUST on iterations those documents, and not on all pages of the template?

in other words - on the main page of the site, we’ve got a list of BRANDS and various headers that only apply to this page.

Is there a way to associate it with the main page, but NOT have it be in the normal "content update" textbox that you use on the Document page?

For example - headers. Is there a way to create a variable similar to [*content*] that will pull a specific header based on which document you’re viewing, rather than having to hardcode it in the document’s content box?]]>
QManning Jan 22, 2007, 11:57 AM https://forums.modx.com/thread/15515/big-noob-here-need-help-starting#dis-post-83584
<![CDATA[Re: Big Noob Here, need help starting]]> https://forums.modx.com/thread/15515/big-noob-here-need-help-starting#dis-post-83583
The content that is displayed can either be hard-coded into the template, or can be managed dynamically with MODx tags. The most central tag is the [*content*] tag. This content is taken from the "Document Content" field of a given document. Documents are stored in the database (as is the template, by the way), and can be accessed via the "Document Tree", the left frame of the Manager, which displays the documents in a virtual tree structure, based on the parent/child relationships of the documents. Every document can be a parent (container), and each document is assigned on creation with a parent (as well as a number of other fields, including its template).

A document is requested by its id (index.php?id=xx), but using the document’s "Alias" (another field you can assign during document creation) and the "Search-Engine-Friendly URL" system along with mod_rewrite and .htacces files for Apache, this index.php?id=xx can be replaced with more friendly URLs such as "home.html" or "contact.htm" or whatever.

Upon request, either directly or through the rewrite system, a document is obtained from the database via its ID, and its associated template is also retrieved. The template is then parsed, and all MODx tags in the template are parsed and inserted into the HTML code. The completed page is then sent on by the server.

Menu building snippets (such as Wayfinder) scan the Document Tree according to the options given at the snippet’s call, and generate a menu accordingly. Thus the structure of your Document Tree, based on the parent/child relationships you assign to your documents as you create them, will be used to determine the structure of the menus these snippets can generate.]]>
sottwell Jan 21, 2007, 05:53 AM https://forums.modx.com/thread/15515/big-noob-here-need-help-starting#dis-post-83583
<![CDATA[Re: Big Noob Here, need help starting]]> https://forums.modx.com/thread/15515/big-noob-here-need-help-starting#dis-post-83582
another method is inserting body id or class to the body tag and then add the specific Id to point to your image file.

But i think you need to read some of the documentation in order to complete this task.]]>
funkybuddah Jan 21, 2007, 05:05 AM https://forums.modx.com/thread/15515/big-noob-here-need-help-starting#dis-post-83582
<![CDATA[Big Noob Here, need help starting]]> https://forums.modx.com/thread/15515/big-noob-here-need-help-starting#dis-post-83581
Ultimately, the site I’m looking to build will look like this: http://www.savannahweb.net/alderfoods/

That’s an HTML mockup, and now I’ve gotta’ start incorporating that look/feel into a functioning site with a quality CMS.

Specifically, I’m a little confused when it comes to documents/variables/snippets/etc.

All pages will have the same layout, but what appears will change depending on what ’page’ someone’s looking at.

So if they are on Page A - I want them to get content for Page A, and the header for Page A. If they are on Page B, I want the same thing. So on and so forth.

Unfortunately, I’m having difficulty discerning exactly how everything relates to one another.]]>
QManning Jan 20, 2007, 10:52 PM https://forums.modx.com/thread/15515/big-noob-here-need-help-starting#dis-post-83581