We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32347
    • 143 Posts
    Hello,

    I have a chunk that I ahve created for quick links at the bottom of a web site. I ahve them all styled with a class called link. SO I ahve added a snippet to the list and it will not style like the others. What do I need to do or how do I gt it to style with the other links?
    Example: <div class="link"><A class="link" title="Home" href="http://www.cofbsa.org/">Home</A>
    *<A class="link" title="about us" href="/index.php?id=3">About Us</A>
    *<A class="link" title="pastor letter" href="/index.php?id=4">Pastor Letter</A>
    *<A class="link" title="belief" href="/index.php?id=6">Belief</A>
    *<A class="link" title="ministries" href="/index.php?id=7">Ministries</A>
    *<A class="link" title="media ministry" href="/index.php?id=16">Media</A>
    *<A class="link" title="monthly prayer focus" href="/index.php?id=14">Prayer Focus</A>
    *<A class="link" title="calendar" href="/index.php?id=15">Calendar</A>
    *<A class="link" title="elder prescod devotional" href="/index.php?id=5">Elder Prescod Letter</A>

    *<A class="link" title="devotions" href="/index.php?id=17">Devotions</A>
    *<A class="link" title="devotional Archive" href="/index.php?id=31">Devotional Archive</A>
    *<A class="link" title="Healing School" href="/index.php?id=22">Healing School</A>
    *<A class="link" title="Ministry Links" href="/index.php?id=62">Ministry Links</A>
    *<A class="link" title="staff" href="/index.php?id=18">Staff</A>
    *<A class="link" title="directions" href="/index.php?id=20">Directions</A>
    *[!LoginLogoutLink? &login_doc_id=94!] *<a href="http://www.cofbsa.org:2095/horde/login.php" target="_blank" class="link">Email</a></div>

    Thanks for any guidance

    jeff
      • 26931
      • 2,314 Posts
      Hi,

      how does the output of the snippet-call look like?...and maybe post the snippet-code too..

      btw, what are the asterixes (*) for...and probably you should write your tags lowecase <a> (assuming xhtml-doctype)

      j
        • 10449
        • 956 Posts
        I’d rewrite the CSS to use .link:a etc. instead of having to use all those inline classes for each link.

        You can simply insert the class here at the bottom of the LoginLogoutLink snippet:

        $html = <<<EOD
        <a href="{$url}" class=\"link\" title="Click here to {$title_lcase}">$title</a>
        EOD;
          • 32347
          • 143 Posts
          *[!LoginLogoutLink? &login_doc_id=94!]
          The * is a bullet for the link

          PHP code n the snippet: $login_args = ’’;
          $logout_args = ’&action=logout’;

          if($_SESSION[’mgrValidated’]) {
          $url = $modx->makeURL($login_doc_id, ’’, $logout_args);
          $title = ’Logout’;
          } else {
          $url = $modx->makeURL($login_doc_id, ’’, $login_args);
          $title = ’Login’;
          }

          $title_lcase = strtolower($title);

          $html = <<<EOD
          <a href="{$url}" title="Click here to {$title_lcase}">$title</a>
          EOD;
          and the properties for the snippet is :&Properties: =undefined;; &login_doc_id=Login/Logout Document ID;int;98

          I am learning how to work with the snippets... if you know of any good tutorials to nderstand what you can do wit them that would also be appreciated. I love the MODX flexability.



          thanks

          jeff
            • 32347
            • 143 Posts
            Hey thanks ganeshXL...it worked. I was not sure where to begin to resolve this issue.

            Thanks again

            Jeff