<![CDATA[ How to create masonry or magazine style blog? - MODX Community Forums]]> https://forums.modx.com/thread/?thread=97312 <![CDATA[How to create masonry or magazine style blog?]]> https://forums.modx.com/thread/97312/how-to-create-masonry-or-magazine-style-blog?page=3#dis-post-526332 My site is in wordpress and I want to move it to Modx and its a blog site so I want a blog on Modx. I tried this many times but failed because of the layout I want.
I used Articles for blog but failed in creating masonry or magazine style blog because Articles show only articlerowtpl posts. So I cant make it grid wise so it post articles like masonry. Like 1 and 2 then 1 and then 2. Currently Articles posts only 1 and then 1 and then 1.. simple blog layout. I want masonry layout. I have themes but I failed on this step.

Please tell me is this possible with Articles ? Or any other Extra?
]]>
Mayanktaker Jun 03, 2015, 06:44 AM https://forums.modx.com/thread/97312/how-to-create-masonry-or-magazine-style-blog?page=3#dis-post-526332
<![CDATA[Re: How to create masonry or magazine style blog?]]> https://forums.modx.com/thread/97312/how-to-create-masonry-or-magazine-style-blog?page=3#dis-post-558377 dexalama May 05, 2018, 07:37 AM https://forums.modx.com/thread/97312/how-to-create-masonry-or-magazine-style-blog?page=3#dis-post-558377 <![CDATA[Re: How to create masonry or magazine style blog?]]> https://forums.modx.com/thread/97312/how-to-create-masonry-or-magazine-style-blog?page=3#dis-post-550097
As an example here's my masonary style blog http://www.hotly.com.au/library

Never used Articles and it doesn't use Collections.



]]>
markg Apr 14, 2017, 01:02 AM https://forums.modx.com/thread/97312/how-to-create-masonry-or-magazine-style-blog?page=3#dis-post-550097
<![CDATA[Re: How to create masonry or magazine style blog?]]> https://forums.modx.com/thread/97312/how-to-create-masonry-or-magazine-style-blog?page=3#dis-post-545769 Quote from: emmanuel at Oct 16, 2016, 08:20 PM
Long time ago i build this demo.
http://dev.empiguet.modxcloud.com/portfolio-with-tags-in-modx.html

YES YES. How to do this ?]]>
Mayanktaker Oct 17, 2016, 06:57 AM https://forums.modx.com/thread/97312/how-to-create-masonry-or-magazine-style-blog?page=3#dis-post-545769
<![CDATA[Re: How to create masonry or magazine style blog?]]> https://forums.modx.com/thread/97312/how-to-create-masonry-or-magazine-style-blog?page=3#dis-post-545763 http://dev.empiguet.modxcloud.com/portfolio-with-tags-in-modx.html]]> emmanuel Oct 16, 2016, 08:20 PM https://forums.modx.com/thread/97312/how-to-create-masonry-or-magazine-style-blog?page=3#dis-post-545763 <![CDATA[Re: How to create masonry or magazine style blog?]]> https://forums.modx.com/thread/97312/how-to-create-masonry-or-magazine-style-blog?page=3#dis-post-526732 Mayanktaker Jun 10, 2015, 02:15 PM https://forums.modx.com/thread/97312/how-to-create-masonry-or-magazine-style-blog?page=3#dis-post-526732 <![CDATA[Re: How to create masonry or magazine style blog?]]> https://forums.modx.com/thread/97312/how-to-create-masonry-or-magazine-style-blog?page=3#dis-post-526568 [[*content:getImagesFromHtml=`1`:phpthumbof=`w=200`]] giving me fatal error and my blog overview page is not opening and rest of the pages opening fine.
Fatal error: Allowed memory size of 335544320 bytes exhausted (tried to allocate 523800 bytes) in /home/modx/core/model/modx/filters/modoutputfilter.class.php on line 912

tested in wamp too but same result. That why I choose other method instead of this extra.]]>
Mayanktaker Jun 07, 2015, 02:25 PM https://forums.modx.com/thread/97312/how-to-create-masonry-or-magazine-style-blog?page=3#dis-post-526568
<![CDATA[Re: How to create masonry or magazine style blog?]]> https://forums.modx.com/thread/97312/how-to-create-masonry-or-magazine-style-blog?page=2#dis-post-526565
with

[[*content:getImagesFromHtml=`1`:phpthumbof=`w=200`]]


you can get the first image from content and use pthumb to resize and crop the image]]>
Bruno17 Jun 07, 2015, 12:49 PM https://forums.modx.com/thread/97312/how-to-create-masonry-or-magazine-style-blog?page=2#dis-post-526565
<![CDATA[Re: How to create masonry or magazine style blog?]]> https://forums.modx.com/thread/97312/how-to-create-masonry-or-magazine-style-blog?page=2#dis-post-526558 Quote from: markh at Jun 06, 2015, 11:43 PM
http://onsitenow.co.uk/modx/how-to-get-the-first-image-from-a-blog-post-for-the-open-graph-protocol-html-head-tags/
https://gist.github.com/govza/4757102
http://modx.com/extras/package/getimagesfromhtml

Thank you very much Mark. I almost got what I what. Just a little problem here.

I am using this snippet -
$content = $modx->resource->content;
if(preg_match("/src=\"(.*?)\"/",$content,$matches)){
    $img  = substr($matches[1],1,strlen($matches[1]));  
}    
else {
    $img  = "assets/images/defaultImage.png";      
}
return $img;


When I use it for a document, its working but this call
[[getFirstImageInResource]]
generating url ttp://imagepath/image.jpg instead of http. I have to put h before snippet call to make it working. so its like
h[[getFirstImageInResource]]

The main problem facing -
When I use this
[[++site_url]][[getFirstImageInResource]]
in my Article extra's container, it only generates default image. I want it to generate image from the article to make it featured image.
I hope you understand what I want to say.
Aslo tell me how can I use this to crop image with phpthumbof?]]>
Mayanktaker Jun 07, 2015, 08:41 AM https://forums.modx.com/thread/97312/how-to-create-masonry-or-magazine-style-blog?page=2#dis-post-526558
<![CDATA[Re: How to create masonry or magazine style blog?]]> https://forums.modx.com/thread/97312/how-to-create-masonry-or-magazine-style-blog?page=2#dis-post-526550 http://onsitenow.co.uk/modx/how-to-get-the-first-image-from-a-blog-post-for-the-open-graph-protocol-html-head-tags/
https://gist.github.com/govza/4757102
http://modx.com/extras/package/getimagesfromhtml]]>
markh Jun 06, 2015, 06:43 PM https://forums.modx.com/thread/97312/how-to-create-masonry-or-magazine-style-blog?page=2#dis-post-526550