Page 1 of 1
{cms_selflink page="page&pid=123"} syntax with parameters
Posted: Wed Mar 07, 2007 12:09 am
by olavt
I do not understand how to use the {cms_selflink page=" "} with parameters.
If I want to create a link using the {cms_selflink page= } to make a link to a page like idex.php?page=artist&aid=123, will the syntax simply be {cms_selflink page="artist&aid=123"} or do I hav do do this different?
A follow-up question is if the cms_selflink can take parameter inputs, something like {cms_selflink Page="artist? rid=$smarty.get.rid"}
Re: {cms_selflink page="page&pid=123"} syntax with parameters
Posted: Wed Mar 07, 2007 12:33 am
by heatherfeuer
The easiest way to use the {cms_selflink} tag is to use the one parameter {cms_selflink page="pageid"} where page id is it's location in your page tree, i.e. 2.1.2. Or you can use page="page-alias"}, which is defined in the options tab of each page of content. Content pages are automatically placed in the menu unless you uncheck that option, again in options.
Let's say on your menu, you have menu item 2 is Artists, submenus would be ArtistOne 2.1, ArtistTwo 2.2, etc. Now let's say that under each artist on the menu structure you have an additional submenu, ArtistOne Portfolio 2.1.1. On the Artist's bio page (2.1 for instance, you could put a {cms_selflink page="pageid of page with referenced art"}.
I just hope I didn't confuse you, but that is the basic and easiest way to use {cms_selflink}.
Re: {cms_selflink page="page&pid=123"} syntax with parameters
Posted: Wed Mar 07, 2007 12:42 am
by olavt
Thank you for your reply. But it did not answer my problem. I am extracting database information from outside CMSMS. It is in the same database because my ISP only give one database, but it is extractedt from tables that are not part of CMSMS.
PageID or alias will - as I understand it - only give the page but not the added parameters. If I use {cms_selflink page="artist"}, I get the artist page, but without parameters. I want to will this page with information from my artist database, which means that I need the page "arist" with information for the artist with ArtistID=n. I can do this with good old HTML-links with parameters. But using the {cms_selflink} would be a simpler and more elegant way of doing this.
Re: {cms_selflink page="page&pid=123"} syntax with parameters
Posted: Wed Mar 07, 2007 2:41 am
by olavt
I found the solution to the first of the two questions: Use the urlparam="xxx".