1
chefry
question about <a href="<{$xoops_url}>
  • 2013/5/13 12:52

  • chefry

  • Home away from home

  • Posts: 1005

  • Since: 2006/10/14


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


2
redheadedrod
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.


3
jlm69
Re: question about <a href="<{$xoops_url}>
  • 2013/5/14 10:04

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


In content you can use XOOPS_URL

something like this:

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

John

4
chefry
Re: question about <a href="<{$xoops_url}>
  • 2013/5/14 12:05

  • chefry

  • Home away from home

  • Posts: 1005

  • Since: 2006/10/14


Thanks John

I'll try it

5
chefry
Re: question about <a href="<{$xoops_url}>
  • 2013/5/22 11:47

  • chefry

  • Home away from home

  • Posts: 1005

  • Since: 2006/10/14


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

6
jlm69
Re: question about <a href="<{$xoops_url}>
  • 2013/5/22 12:05

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


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

7
chefry
Re: question about <a href="<{$xoops_url}>
  • 2013/5/22 12:19

  • chefry

  • Home away from home

  • Posts: 1005

  • Since: 2006/10/14


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>

8
sabahan
Re: question about <a href="<{$xoops_url}>
  • 2013/5/22 14:20

  • sabahan

  • Quite a regular

  • Posts: 317

  • Since: 2006/3/4 5


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>

Login

Who's Online

204 user(s) are online (74 user(s) are browsing Support Forums)


Members: 0


Guests: 204


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits