Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
list of blogs with excerpt (perex)
#1
Hello everyone,

I'm dealing with the problem, and I cannot find any reasonable solution. I would like to have a list of blog articles (descendants) and its parent page. For example on site.com/blog I would like to have list of blog, that have address (site.com/blog/blog-article). The problem is that the list should include the excerpt, the date, and the title. I can get the last two by filtering the output of menu_data() function, but I am stuck with excerpt. My first idea was to get the url from menu data and parse the original xml, but there was a problem with parsing using functions simplexml_load_file() and xpath(), because they were failing on parsing HTML tags included in the content.

Am I doing it the right way or is there any better solution, maybe included in the gs? If anyone could help me to get it the right way. Thank you all very much. :-)
Reply
#2
I believe you’re doing it exactly right and I don’t understand what you mean by failing to parse the HTML… Are you decrypting the data you get from the XPath search? All body content is saved as encoded HTML in the XML files.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply




Users browsing this thread: 1 Guest(s)