<![CDATA[ Quick, easy question about menu and (resource) page numbers - My Forums]]> https://forums.modx.com/thread/?thread=95851 <![CDATA[Quick, easy question about menu and (resource) page numbers]]> https://forums.modx.com/thread/95851/quick-easy-question-about-menu-and-resource-page-numbers?page=3#dis-post-518777
So, in ModX, every page has a resource number. If you use the Modx built-in menu system, each menu item is referenced by its resource number, not by URL.

For example:

Home/About might use www.mydomain/revo/index.php?a=3 (if that page's resource identifier is "3")

instead of my more typical way of calling a url, such as: www.mydomain/revo/about.php

If I do not use the built-in menu system, I'd like to create a navigation menu system that uses URLs (like the second example), not resource numbers.

Can I do that?

I realize pages will be assigned resource numbers, but do I have to use them? Will I still be able to pick pages from the resource tree on the left, and edit them, publish them, and have the (URL-style) menu system point to the edited/published page?

Thanks!

Dennis]]>
dennisleahy Jan 19, 2015, 10:03 PM https://forums.modx.com/thread/95851/quick-easy-question-about-menu-and-resource-page-numbers?page=3#dis-post-518777
<![CDATA[Re: Quick, easy question about menu and (resource) page numbers]]> https://forums.modx.com/thread/95851/quick-easy-question-about-menu-and-resource-page-numbers?page=3#dis-post-519574 frogabog Jan 30, 2015, 11:14 AM https://forums.modx.com/thread/95851/quick-easy-question-about-menu-and-resource-page-numbers?page=3#dis-post-519574 <![CDATA[Re: Quick, easy question about menu and (resource) page numbers]]> https://forums.modx.com/thread/95851/quick-easy-question-about-menu-and-resource-page-numbers?page=3#dis-post-519428 dennisleahy Jan 28, 2015, 11:25 PM https://forums.modx.com/thread/95851/quick-easy-question-about-menu-and-resource-page-numbers?page=3#dis-post-519428 <![CDATA[Re: Quick, easy question about menu and (resource) page numbers]]> https://forums.modx.com/thread/95851/quick-easy-question-about-menu-and-resource-page-numbers?page=3#dis-post-519121 thank you thank you...but it may be a day or so before I get back to this. My good friend just had a heart attack and got airlifted to my city for surgery...
...back to this asap.
-Dennis]]>
dennisleahy Jan 23, 2015, 08:19 PM https://forums.modx.com/thread/95851/quick-easy-question-about-menu-and-resource-page-numbers?page=3#dis-post-519121
<![CDATA[Re: Quick, easy question about menu and (resource) page numbers]]> https://forums.modx.com/thread/95851/quick-easy-question-about-menu-and-resource-page-numbers?page=3#dis-post-519084
in .htaccess, remove the trailing / from the rewrite base

i.e. rewriteBase /revo

This however, will not allow your site to display as www.yoursite.com/potatoes.html. Rather than I think the easiest way to get that would be to move the site to your root folder, yet be sure not to name any of your existing static files with the same alias as your MODX pages. MODX runs perfectly fine along side static .html files, and is in fact one of the methods I use to convert static sites to MODX.

There is a system setting in the FURL's section for automatically writing the alias, so you don't really need to add that manually if you turn that setting on. It will however take the pagetitle, but that can be altered after the save if you don't like it.

I pulled up a page (a "resource") to clone, entered potatoes into the Resource Alias field, appended a space and the word potatoes to the Page Title field, and clicked Duplicate.


What happens: I get a new resource, but it ignores the page title change and alias, and just clones the page adding a new resource number (this is no doubt MODX designed behavior, but confusing why a clone does not pick up what is currently in the fields.) If I then take that new resource, change its page Title and Resource Alias fields, and click Save, I get a change in the resource name. When I click View, I get a blank page, and the URL shown is http://www.mywebsite.com/revo/potatoes.html

So, the alias functionality appears to be working, but the page is not getting assembled properly. I tried the .htaccess file without the /revo/ subdirectory, but just get "Error establishing a database connection."

Can anyone suggest what may be wrong with my attempted MODX FURL functionality?

Ok, so as I'm sure you're realizing, what you got from MODX while duplicating the resource is exactly what it's supposed to do. It will duplicate the resource's values, but it does not duplicate the pagetitle or the alias, which makes sense because you don't actually want duplicate pagetitles or aliases. Rather, if you don't rename the duplicate, the pagetitle and alias will reflect "duplicate of blah blah" resource.

<base href="http://www.mywebsite.com/revo/" />

In your template, change this to <base href="[[++site_url]]" />. That is necessary for FURLS, and will work regardless of if the site is in the subfolder, root, or on a mars server.

I think once you get the rewrite base set in .htaccess, the base path in the template, and turn FURLs back on in system settings you'll see much better results with whatever template you're using.]]>
frogabog Jan 23, 2015, 02:21 PM https://forums.modx.com/thread/95851/quick-easy-question-about-menu-and-resource-page-numbers?page=3#dis-post-519084
<![CDATA[Re: Quick, easy question about menu and (resource) page numbers]]> https://forums.modx.com/thread/95851/quick-easy-question-about-menu-and-resource-page-numbers?page=3#dis-post-519078
I doubt the base template is designed to be actually used - just a starting point. It's "Problem Solving 101" time I guess - start with the base template (which "works") and add your stuff in line by line until something breaks. Good luck!]]>
gissirob Jan 23, 2015, 12:14 PM https://forums.modx.com/thread/95851/quick-easy-question-about-menu-and-resource-page-numbers?page=3#dis-post-519078
<![CDATA[Re: Quick, easy question about menu and (resource) page numbers]]> https://forums.modx.com/thread/95851/quick-easy-question-about-menu-and-resource-page-numbers?page=3#dis-post-519077 Quote from: gissirob at Jan 23, 2015, 05:11 PM
Sorry, I'm stumped. I cannot wrap my head around how turning on FURLs would cause the resource to use an entirely different template. Hopefully someone else...?

gissirob , You have given me the gift of your time and brainpower, and I really appreciate it. I think you may be onto something. With FURLs on, MODX cannot find or cannot load my resource, or its template, or the template's chunks (and so, in desperation, loads the "Home" page using the "BaseTemplate" template.)

I'm not sure why MODX's BaseTemplate does not have a doctype declaration, but it doesn't. Mine does, and it's "strict", so maybe the doctype is not playing nice.

But I do think that you're right: FURLs are set up correctly, the .htaccess is set up correctly... and what is left is that the code (my code) cannot execute. So, it has got to be something in my template or one of the chunks.

Thank's a million for the efforts you gave to helping!

Dennis]]>
dennisleahy Jan 23, 2015, 11:24 AM https://forums.modx.com/thread/95851/quick-easy-question-about-menu-and-resource-page-numbers?page=3#dis-post-519077
<![CDATA[Re: Quick, easy question about menu and (resource) page numbers]]> https://forums.modx.com/thread/95851/quick-easy-question-about-menu-and-resource-page-numbers?page=2#dis-post-519076 gissirob Jan 23, 2015, 11:11 AM https://forums.modx.com/thread/95851/quick-easy-question-about-menu-and-resource-page-numbers?page=2#dis-post-519076 <![CDATA[Re: Quick, easy question about menu and (resource) page numbers]]> https://forums.modx.com/thread/95851/quick-easy-question-about-menu-and-resource-page-numbers?page=2#dis-post-519074 Quote from: gissirob at Jan 23, 2015, 03:54 PM
What you have there is not your template at all - it is the "Base Template" (effectively empty) that comes with Modx out of the box. So I would have a look at the properties of the Resource you are trying to load. I can only assume it is set to use that template.

Yes, that first code block is what was in page source, and is utterly generic except that it did pick up the correct base href (probably out of the .htaccess file?)

If you look at the second code block in my previous reply, you'll see the template I use (which includes:
[[$head]], [[$headerimages]], [[$topnavmenu]], and [[$footer]] - plus, the [[*content]]

The resource I'm trying to load uses my custom template. (It works, when I don't try to switchover to FURLs.)]]>
dennisleahy Jan 23, 2015, 10:44 AM https://forums.modx.com/thread/95851/quick-easy-question-about-menu-and-resource-page-numbers?page=2#dis-post-519074
<![CDATA[Re: Quick, easy question about menu and (resource) page numbers]]> https://forums.modx.com/thread/95851/quick-easy-question-about-menu-and-resource-page-numbers?page=2#dis-post-519071 gissirob Jan 23, 2015, 09:54 AM https://forums.modx.com/thread/95851/quick-easy-question-about-menu-and-resource-page-numbers?page=2#dis-post-519071