We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49577
    • 12 Posts
    Quote from: BobRay at Feb 19, 2015, 05:33 AM
    One final question I have... I have a CSS menu using wayfinder which highlights the current page, how can I pass this information through to modx so it think the static "forum" page is being visited so this link will light up?

    I think this will do it. In the part where you instantiate MODX, set $modx->resource to that page using the page ID (say it's 12).

    $modx->resource =& $modx->getObject('modResource', 12);

    So So Close but adding this code gives me a blank page with the words "No Resource" as if the resource does not exist. I have tried using the resource id and name with the same issue.

    EDIT: Worked it out.

    Had to remove additional code in regards to setting the resource id to the homeid.

    I cannot get the CSS to load properly so I have hard coded this for now. Will leave as-is so I can carry on with this project.

    Appreciate everyone help with this, I know I am very vague but cannot beleive how far I have got with everyones help. [ed. note: bonkas last edited this post 9 years, 1 month ago.]
      • 3749
      • 24,544 Posts
      If the CSS doesn't load with regClientCSS() and the URL is correct (remember that it's a URL, not a path), it's almost always because the page doesn't have head tags. MODX uses the closing head tag to position the CSS tag.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting