xoops forums

chefry

Home away from home
Posted on: 2013/5/13 12:52
chefry
chefry (Show more)
Home away from home
Posts: 1005
Since: 2006/10/14
#1

question about <a href="<{$xoops_url}>

is there a way to use <a href="<{$xoops_url}> within content?

Instead of having to use the actual URL (i.e. http://www.xxx.com/images/etc etc

redheadedrod

Home away from home
Posted on: 2013/5/14 8:30
redheadedrod
redheadedrod (Show more)
Home away from home
Posts: 1296
Since: 2008/2/26
#2

Re: question about <a href="<{$xoops_url}>

If you setup a smarty variable yes you can do this quite easily.

I haven't messed around with smarty lately but it should be a simple matter.

jlm69

Module Developer
Posted on: 2013/5/14 10:04
jlm69
jlm69 (Show more)
Module Developer
Posts: 719
Since: 2002/7/19
#3

Re: question about <a href="<{$xoops_url}>

In content you can use XOOPS_URL

something like this:

<a href='".XOOPS_URL."/modules/$mydirname/'>".XOOPS_URL."/modules/$mydirname/</a>

John

chefry

Home away from home
Posted on: 2013/5/14 12:05
chefry
chefry (Show more)
Home away from home
Posts: 1005
Since: 2006/10/14
#4

Re: question about <a href="<{$xoops_url}>

Thanks John

I'll try it

chefry

Home away from home
Posted on: 2013/5/22 11:47
chefry
chefry (Show more)
Home away from home
Posts: 1005
Since: 2006/10/14
#5

Re: question about <a href="<{$xoops_url}>

Finally got a chance to try this and unfortunately it didn't work

jlm69

Module Developer
Posted on: 2013/5/22 12:05
jlm69
jlm69 (Show more)
Module Developer
Posts: 719
Since: 2002/7/19
#6

Re: question about <a href="<{$xoops_url}>

What exactly do you mean by content?
The line I gave you would work in a php page, I took it right from the classifieds module.
When you say content do you mean in an editor?

John

chefry

Home away from home
Posted on: 2013/5/22 12:19
chefry
chefry (Show more)
Home away from home
Posts: 1005
Since: 2006/10/14
#7

Re: question about <a href="<{$xoops_url}>

yes, in the editor

instead of having a fixed URL for things like pictures, URL links, etc

<a href="<{$xoops_url}/article/bees>the life of Bees</a>

instead of

<a href="http://www.mysite.xxx/article/bees>the life of Bees</a>

sabahan

Quite a regular
Posted on: 2013/5/22 14:20
sabahan
sabahan (Show more)
Quite a regular
Posts: 317
Since: 2006/3/4 5
#8

Re: question about <a href="<{$xoops_url}>

in theme or modules templates

<a href="<{$xoops_url}>/modules/news">News</a>

in blocks we can use this

<a href="{X_SITEURL}/modules/news/">News</a>

in editor not sure if its the correct way..it is something like this

<a href="/../modules/news/">News</a>