Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Resizing of Title Logo

Started by Muut Archive 11 years ago · 2 replies · 446 views
11 years ago

I have created a link to an image logo:
'<a href="{{ base_url == '' ? '/' : base_url }}">{{ pages.find('/images').media['logo.png'].html }}</a>'
When trying to apply any manipulations to this logo:
'<a href="{{ base_url == '' ? '/' : base_url }}">{{ pages.find('/images').media['logo.png'].cropResize=50,50.html }}</a>'
I receive a syntax error, I am sure it is something I am doing wrong. Would someone be kind enough to point me in the correct direction?

11 years ago

Your mixing Markdown syntax with Twig syntax. In the media section of the docs, there are tabs for both versions. Your need to do this:

TWIG
<a href=“{{ baseurl ==' ? ‘/’ : baseurl }}”>{{ pages.find('/images').media['logo.png'].cropResize(50,50).html }}</a>
11 years ago

Makes perfect sense, pardon my obvious oversight. By the way, great job! Little bit of a learning curve, but we are getting there! Thank You!

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 2287 9 years ago
Archive · by Muut Archive, 9 years ago
2 1500 9 years ago
Archive · by Muut Archive, 9 years ago
2 4750 9 years ago
Archive · by Muut Archive, 9 years ago
1 3565 9 years ago
Archive · by Muut Archive, 9 years ago
3 1625 9 years ago