Welcome to Geeklog Wednesday, December 11 2019 @ 01:52 pm EST

Geeklog Forums

Any way to concatenate variables and text?


Status: offline

TennSeven

Forum User
Junior
Registered: 26/04/09
Posts: 16
Can I concatenate a variable and text if (for instance) I want my theme to be able to find a logo I am using regardless of what the geeklog path is?

As an example, I would like to change the header.thtml file from:

<img src="{site_logo}" width="151" height="56" alt="{site_name}"{xhtml}>

To something like:

<img src="{layout_url}/images/myLogo.png" width="151" height="56" alt="{site_name}"{xhtml}> (obviously this code doesn't work)

So that I could use my own logo file, and the theme would still find that file regardless of the absolute path of whatever geeklog installation it was being used in.

Is this possible?
 Quote

Status: offline

::Ben

Forum User
Full Member
Registered: 14/01/05
Posts: 1569
Location:la rochelle, France
Hello TennSeven,

PHP Formatted Code
<img src="{layout_url}/images/myLogo.png" width="151" height="56" alt="{site_name}"{xhtml}>


This code is working if myLogo.png exist under your_theme/images folder

::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
 Quote

TennSeven

Anonymous
Thank you! I tried that earlier and it didn't work; I must have had an error somewhere else in the line.
 Quote

All times are EST. The time is now 01:52 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content