Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Resizing of Title Logo

Started by Muut Archive 11 years ago · 2 replies · 356 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 1349 9 years ago
Archive · by Muut Archive, 9 years ago
2 934 9 years ago
Archive · by Muut Archive, 9 years ago
2 4060 9 years ago
Archive · by Muut Archive, 9 years ago
1 2946 9 years ago
Archive · by Muut Archive, 9 years ago
3 1118 9 years ago