Page 1 of 1

link to other pages

Posted: Wed Apr 02, 2008 11:51 am
by RobMan
Hi!

i'm not using the menu CMSMS can build for a certain website. Instead i'm using buttons like this:

Code: Select all

<a href="home"><img src="home.jpg" border="0"></a>
how can i make CMSMS link this to another page (same template)?

Re: link to other pages

Posted: Wed Apr 02, 2008 12:02 pm
by alby
RobMan wrote: how can i make CMSMS link this to another page (same template)?
Use orange palm (internal link) in Tiny editor

Alby

Re: link to other pages

Posted: Wed Apr 02, 2008 12:17 pm
by RobMan
Thanks!

I'll try soon!

Re: link to other pages

Posted: Wed Apr 02, 2008 3:20 pm
by RobMan
I was about to try when I realized it can't be done.
This is because the button is in HTMLcode IN the template. The template doesn't have a WYSIWYG-editor thus the option is not available. Also, I could insert the buttons as content but this will give editors the possibility to change the buttons and I don't want this to be done by editors, only by designers and in the template.

I hope you get what I'm saying :)

Re: link to other pages

Posted: Wed Apr 02, 2008 3:21 pm
by calguy1000
then go to extensions >> tags and read up on the cms_selflink tag.

Re: link to other pages

Posted: Wed Apr 02, 2008 3:27 pm
by RobMan
Thank you! That is exactly what I need.

But I don't get how I could specify exactly to link.

Old HTML:

Code: Select all

<a href="home"><img src="home.jpg" border="0"></a>
New CMSMStag:

Code: Select all

{cms_selflink page"home"}<img src="home.jpg" border="0">
Does this work? My best guess is not because how could CMSMS know where to stop the link. I mean, it could read that the link needs to start before the image but I don't see how it could know the link only needs to apply to the image itself.
Or am I doing something wrong?

Re: link to other pages

Posted: Wed Apr 02, 2008 3:46 pm
by calguy1000

Re: link to other pages

Posted: Wed Apr 02, 2008 6:09 pm
by RobMan
Great!

I'l try asap!

Re: link to other pages

Posted: Thu Apr 03, 2008 3:11 am
by pixelita
Or you could do it with css:

In your Template:

Code: Select all

<a class="home" href="{cms_selflink href='pagealias'}"></a>
In your Stylesheet:

Code: Select all

.home {
   background-color: #xxxxxx; [whatever your bg color is or "transparent"]
   background-image: url(/path/to/home.jpg);
   background-repeat: no-repeat;
   background-position: center center;
   height: ??px;
   width: ??px;
}
Would that work?

Re: link to other pages

Posted: Thu Apr 03, 2008 10:24 am
by RobMan
To be honest, the solution of calguy1000 is easier. Though, if your solution is more crossbrowser-compatible or if the calguy1000's solution doesn't work, I'll try yours!