Internal links

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
Dopple

Internal links

Post by Dopple »

I am trying to set up my nav bar on my template and I'm just wondering how to set up relative links for it? I have tried linking to the different content names like band.php and gallery2.php but this isn't working. Can anyone help me out here. I'm just wondering what the path would be for say a content part called demo.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Internal links

Post by Ted »

{cms_selflink page='demo'} will get you to the demo page.
Dopple

Re: Internal links

Post by Dopple »

Thanks. If I was wanting to use it in relation to a tag like How would I then alter it to work with a button?
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Internal links

Post by Ted »

I believe {cms_selflink page='demo' text=''} SHOULD work.  Though, I didn't test it.  Kind of trying to catch up on the forums, as I've been away all day

Please let me know if it doesn't work and I'll pursue it a little further.

Thanks!
Dopple

Re: Internal links

Post by Dopple »

That works a treat. Thank you very much. It's XHTML Strict DTD valid as well.
chipus

Re: Internal links

Post by chipus »

Hi Ted,

I got the problem. I tried to use the code but it's going wrong. Because what i want to do is to put this code into a Content Page, not a Template. And the code seem only work with the Template only.

Code: Select all

<td align="right">
            <p>{cms_selflink dir="previous" lang='0' text='<img src="uploads/images/next-button.gif"'} 
<br />
            {cms_selflink dir="next" lang='0' text='<img src="uploads/images/pre-button.gif"'}</p>
</td>
This is the code that i put into the Source of a content page. Because i want to have 2 button to go Previous and Next.

The attachment below is what i got when i exist the Source and preview the page.


After that, i tried to go back to the Source. And this is what i got:

Code: Select all

<td align="right">
            <p>{cms_selflink dir="previous" lang='0' text='<img alt="" src="uploads/images/next-button.gif" /> {cms_selflink dir="next" lang='0' text='<img alt="" p="" src="uploads/images/pre-button.gif" /> </p>
            </td>

Could you please help me.



[attachment deleted by admin]
Last edited by chipus on Thu Apr 27, 2006 10:13 am, edited 1 time in total.
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm

Re: Internal links

Post by Russ »

cms_selflink will work in contents... here is an example
http://www.cms.shoesforindustry.net/testmenu.html

So I'm not sure what you want? Is it just the images and paths? I'm also not clear why you might want to put this in 'contents' rather than a template.


Russ
p.s. looking at he code you could lose the tags? and the table?
chipus

Re: Internal links

Post by chipus »

hi Russ,

Thx for your reply.

I know that the cms_selflink will work with the content. However, when i try to use the image button, it's not work.

The reason why I want to use the button in the content, rather than in the template, because i don't want to have the next button and the previous button in every page.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Internal links

Post by Dr.CSS »

i've made a modification to a copy of the prev./next links code to use an img. on this page can you find them?  :D

    mark
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Internal links

Post by Dr.CSS »

chipus
did you get it to work?

    mark
chipus

Re: Internal links

Post by chipus »

maksbud wrote: chipus
did you get it to work?

     mark
hi Mark,

I think u use the selflink in your template. right?

I can do it too.

What i really want to find out is how to use the button, using the selflink in my content page

Thx for your help, but i still get nothing :(
Locked

Return to “CMSMS Core”