Cross-Controller Links In Cmarkdown


(Tomasz) #1

How to create a correct links in Markdown, to point to a different controller then current one?

If I want to link to any page within the same controller, there is no problem:


Use [contact](contact.html) form.

But, when I want to point to a different controller, then this fails:


You must be [logged-in](user/login.html) to continue.

because it adds controller (user) to the current one, not replaces it.

On the other hand, if I use such construction:


you must be [logged-in](/user/login.html) to continue.

then CMarkdown creates link with path (folder) cutted-off, which – again – points to an non-existing file.

And to avoid this, I have to use full application path:


You must be [logged-in](/yii/acrid_barebone/user/login.html) to continue.

Which I personally would like to avoid.


(Maciej Lizewski) #2

seems like it is not "controller" aware because it is based on non-yii-framework parser. I have no much knowledge on this component, however you could try to use relative paths as you would normally with directories:


../user/login.html


(Tomasz) #3

God! So simple and working like a charm! :]

Thousand thanks! :]


(Maciej Lizewski) #4

just be careful when using parameters mapped in path style :)