We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8619
    • 229 Posts
    Ok, I’m thoroughly confused (and tired) from looking for the styling issues.

    I have the NewsManager allowing me to create postings, and the NewsEditor is now showing all posts that are in the container document.

    The problem I am having is creating the styling for the posts as they are created. When I am testing the creation of the post, I am using just the page title, long title, summary and description. It is creating the page in the correct location, with the correct settings, etc. However, there is no styling for it. It is just coming up with nothing around it, therefore the ’post’ that was just created is all crammed up against my breadcrumb.

    I know I am missing a template call or maybe a TV somewhere, but I am completely lost with this as I have read the documentation till I can’t see and searched till my fingers are getting carpel tunnel.

    I would truely appreciate any help with this as I am not familiar with TV’s (yet) or with where I am missing the template call at.

    Thanks a ton in advance!

    Elliott
      • 7923
      • 4,213 Posts
      Quote from: ejcross at Jan 02, 2007, 07:39 AM

      You’re right...hadn’t thought of that.....I’m using Ditto now for the links and it is working fine. One other question is how can I put the link on the main member login page for only the ’editor’ members to follow to their respective main editor page when they login? I guess so that it’s not visible to everyone that signs in, only to the member that has the editor rights.... does that make sense?
      If the document is assigned to editor usergroup only and not public, it will automatically show only to the members in that usergroups (+to admins).

      Quote from: ejcross at Jan 02, 2007, 01:12 PM

      Ok, I’m thoroughly confused (and tired) from looking for the styling issues.

      I have the NewsManager allowing me to create postings, and the NewsEditor is now showing all posts that are in the container document.

      The problem I am having is creating the styling for the posts as they are created. When I am testing the creation of the post, I am using just the page title, long title, summary and description. It is creating the page in the correct location, with the correct settings, etc. However, there is no styling for it. It is just coming up with nothing around it, therefore the ’post’ that was just created is all crammed up against my breadcrumb.

      I know I am missing a template call or maybe a TV somewhere, but I am completely lost with this as I have read the documentation till I can’t see and searched till my fingers are getting carpel tunnel.

      I would truely appreciate any help with this as I am not familiar with TV’s (yet) or with where I am missing the template call at.

      Thanks a ton in advance!

      Elliott
      Do you have the necessary CSS code in your site template to handle the styling of Ditto output? (if the template is something that you have done by yourself) Ditto doesn’t add any default css code to style it’s output, look at the documentation for some example css..


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 8619
        • 229 Posts
        So the actual page (final page) once it is entered via NewsManager/NewsEditor is styled through Ditto?

        Look here:

        http://016b4fe.netsolhost.com

        login in the sidebar using:

        user: testing
        pswd: test123

        Follow the links for ’Chad’s Corner’ and see what the styling is that is happening on the final, full version of the output page. If this is styled with Ditto, then I can find it and fix it. However, nothing is showing up, no ’div’ or anything when I view the page source, so I can’t tell where it is coming from.

        Thanks!
          • 7923
          • 4,213 Posts
          No, the "final pages" are not styled with ditto of course.. but I don’t see what’s the issue there.. just wrap the text in your document in a paragraph element or put some
          tags after the breadcrumbs snippet call, or put the snippet call in the template and wrap the [*content*] placeholder in a div block or something... just normal styling.. or did I just look the wrong pages.. provide a full url to some document if this did not help.


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 8619
            • 229 Posts
            I think you looked in the wrong page.... I can’t provide the full url since it is secured, but when you log into the members area, the main member area page has a subsection called ’Chad’s Corner’. This is where I have the Ditto call with a template for the summary of the article, with the read more link. Click on the read more link and it should take you directly to the page in question.

            You will see that at the top, it is showing the content right up against the breadcrumb, and I’m not sure how to style this as this is the page that the full article or content should be displaying on.

            On the main page I am only using Ditto to show the page title, summary, and then the link call.

            The article page should have the title, content, etc. on it.

            Does this help make it clear as mud???? grin

            Confusing myself here too....lol

            THanks!
              • 8619
              • 229 Posts
              After some deep thought about this issue, here is what I am looking for:

              When one of my ’Editor’ role users logs in to the site through the members area, they can go to the NewsManager / NewsEditor section and create a new post.

              This new post shows up fine on the main members area page, and also shows up like I want it under their subsection page. i am using Ditto to show the pagetitle, summary, and link.

              The problem is that I don’t know how to style the entire actual page so when someone clicks on the link to go to that specific topical page, it is styled correctly. Nothing as far as styling is done or showing up.

              So, how do I take what someone is entering and create an automatic template to show up on the newly created document page that they have created?

              Thanks!
                • 8619
                • 229 Posts
                Is the ’Inherit Parent Template’ something I need to be looking at here for what I need?

                The problem is that when someone clicks on the ’Read More’ link that is created by Ditto, it takes them to the unstyled page that was created through NewsManager / NewsEditor. What do I need to use to apply a template to the newly created document automatically so that when someone clicks on ’Read More’ they get the newly created and styled document?
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  I thought that the NewsEditor call had an option for specifying the template to use? Otherwise, the document will have the default site template.
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 8619
                    • 229 Posts
                    I am calling the template with this:

                    [!Ditto? &startID=`29` &summarize=`3` &tpl=`DittoNewsTpl_main` &displayArchive=`0`!]

                    and the template that is showing the summary on the main page is:

                    <h3>[+title+]</h3>
                    <div>[+summary+]</div>
                    <p>[+link+]</p>

                    The problem that I am having is when an editor creates a new post, it shows up fine where I want it to be. However, when someone clicks on the [+link+] to go to that newly created child page under the container, and it opens, it is completely unstyled.

                    I am using the above ditto call on the main members area page to show a recent summary of the most recent article, and then on each individuals page I am using this:

                    [!Ditto? &amp;startID=`31` &amp;summarize=`6` &amp;tpl=`DittoNewsTpl` &amp;paginate=`1` &amp;alwaysshow=`1`!]

                    Showing <strong>[+start+]</strong> - <strong>[+stop+]</strong> of <strong>[+total+]</strong> Articles




                    <div>
                    [+previous+] [+pages+] [+next+]
                    </div>

                    Any help would be appreciated. I just can’t figure out how to automatically apply the template / styling to a new post so that it shows up in the page correctly when someone clicks ’Read More’.
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      The template for the new document can be set with the &template=`templatename` attribute in the snippet call. If this is not set, the default site template is used for the document.
                      &template - name of template to use for news post
                      $template = isset($template) ? $modx->db->getValue('SELECT id FROM '.$modx->getFullTableName('site_templates').' WHERE templatename=\''.mysql_escape_string($template).'\'') : $modx->config['default_template'];

                      So if you create a new news article with NewsEditor, it will be using the default site template unless you specify a different one. If your new news article is not styled to your liking, fix the CSS for the template you are using.
                        Studying MODX in the desert - http://sottwell.com
                        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                        Join the Slack Community - http://modx.org