And it would be best to set one (the only one) way of generating links to content that simply relies on core system setting. This way should be the only one in the core and add-on. I saw in some add-ons that links are generated 'manually' - which can end in confusion like this one.
Edit:
I mean one function, placeholder or something like that.
[ed. note: khyrlik last edited this post 14 years, 1 month ago.]
---
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. Martin Golding
-
MODX Staff
- 10,725 Posts
So using abs would only be useful in multi-context sites based on subfolders OR when not using a base element with the site_url.
Generally, I always leave mine set to relative. Relative (-1) and full should be completely interchangeable. 'abs' is a special case.
After some analysing of Articles' code I see that it depends on makeURL (creating links). So it generates bad links (or not), it depends. In case when Articles container is starting page, problem with FURLs in Articles needs to be fixed by either:
A) changing links generator to format:
sitename.com/ArticlesAlias/... (for example sitename.com/articles/tags/sport)
or
B) Fixing some function which is responsible for getting arguments from links and passing them to right resource so it 'finds' Articles in links without alias (eg. sitename.com/tags/sport).
If it's not clear tell me.
[ed. note: khyrlik last edited this post 14 years, 1 month ago.]
---
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. Martin Golding
-
MODX Staff
- 10,725 Posts
Articles has it's own method of generating URI's for it's Resources. I think this is becoming an Articles discussion, and not necessarily one about the MODX core.
I thought that there is some MODX core method for creating URIs for any Resource according to universal scheme, but I',m starting to get it. There is no such thing and Resource is fully responsible for managing it's URIs (generating and servicing), right?
---
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. Martin Golding
-
☆ A M B ☆
- 24,524 Posts
Articles is a special case; it overrides the core settings to do things its own way.
Articles both uses makeUrl() and modifies the results. Which it does is dependent upon the "child". For instance, it makes all child Articles Containers use the same path is the parent Articles Container. That is: a resource hierarchy of path/blog1/blog2 translates to a URL of path/blog2. Just one example.