1
Shiva
Custom block and relative referencing
  • 2008/6/4 9:11

  • Shiva

  • Quite a regular

  • Posts: 280

  • Since: 2006/7/9 1


Hello All,

Can someone explain how to reference files (images) from a custom block. Ideally from the current theme or from the images folder in root.

It is not working at the moment because the relative path changes if I am in a module as opposed to the front page.

Much appreciation in advance. Thank you,

Shiva

2
kerkyra
Re: Custom block and relative referencing
  • 2008/6/4 12:26

  • kerkyra

  • Just can't stay away

  • Posts: 553

  • Since: 2005/2/14


try like this in the template file

<{$xoops_url}>/themes/themename/images/imagename
whttp://www.guidemap.gr - Beta is out...

3
Shiva
Re: Custom block and relative referencing
  • 2008/6/4 13:03

  • Shiva

  • Quite a regular

  • Posts: 280

  • Since: 2006/7/9 1


I don't think '<{$xoops_url}>' works in cutom blocks.

I have found a solution, I have set it as a php script and then I echo the html, something like this:
echo '



Hello>



4
kerkyra
Re: Custom block and relative referencing
  • 2008/6/4 13:48

  • kerkyra

  • Just can't stay away

  • Posts: 553

  • Since: 2005/2/14


how about this...??

{X_SITEURL}themes/themename/images/imagename
whttp://www.guidemap.gr - Beta is out...

5
Shiva
Re: Custom block and relative referencing
  • 2008/6/4 19:19

  • Shiva

  • Quite a regular

  • Posts: 280

  • Since: 2006/7/9 1


That works! Thank you!

Does anyone have a complete list of such variables that can be used in custom blocks?

Login

Who's Online

385 user(s) are online (257 user(s) are browsing Support Forums)


Members: 0


Guests: 385


more...

Donat-O-Meter

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

Latest GitHub Commits