link to other pages

General project discussion. NOT for help questions.
Post Reply
RobMan
Forum Members
Forum Members
Posts: 13
Joined: Sat Mar 29, 2008 1:55 pm

link to other pages

Post 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)?
Last edited by RobMan on Wed Apr 02, 2008 12:16 pm, edited 1 time in total.
alby

Re: link to other pages

Post 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
RobMan
Forum Members
Forum Members
Posts: 13
Joined: Sat Mar 29, 2008 1:55 pm

Re: link to other pages

Post by RobMan »

Thanks!

I'll try soon!
RobMan
Forum Members
Forum Members
Posts: 13
Joined: Sat Mar 29, 2008 1:55 pm

Re: link to other pages

Post 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 :)
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: link to other pages

Post by calguy1000 »

then go to extensions >> tags and read up on the cms_selflink tag.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
RobMan
Forum Members
Forum Members
Posts: 13
Joined: Sat Mar 29, 2008 1:55 pm

Re: link to other pages

Post 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?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: link to other pages

Post by calguy1000 »

Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
RobMan
Forum Members
Forum Members
Posts: 13
Joined: Sat Mar 29, 2008 1:55 pm

Re: link to other pages

Post by RobMan »

Great!

I'l try asap!
User avatar
pixelita
Power Poster
Power Poster
Posts: 388
Joined: Sun Sep 16, 2007 3:07 am

Re: link to other pages

Post 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?
Submit your site to the We Love CMSMS showcase
RobMan
Forum Members
Forum Members
Posts: 13
Joined: Sat Mar 29, 2008 1:55 pm

Re: link to other pages

Post 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!
Post Reply

Return to “General Discussion”