Show Navigation
Conversation
Notices
-
!Hubzilla Development I'm finally digging into the Articles system to see what kinds of modifications I can make to it. As per usual, I have a few questions.
If I wanted to modify the elements inside of the article content, would I need to effectively override the markup template? I noticed that currently, articles use cards.tpl for get_markup_template
, I'm a little curious as to whether creating an articles.tpl at some point might make sense for article-specific customizations. I'm trying to figure out how to remove the view article / view summary
link.
Another thing I'd love to figure out is how to display different views depending on whether I'm looking at the article index, or the article display. I know that Hubzilla generally treats these two things as the same when it comes to posts / the stream, is there a sane way to separate the two? I think I want my index to be a grid of thumbnails and links, whereas the article display would be the full-length content. As a workaround, it might be possible to just create a plugin and set up a different index view at a different URL path, but that might be a bit of a hacky experience.
-
Currently the difference between the two modules (articles and cards) are very minor and it made sense to only have one common template to ease maintenance. If you feel they need to diverge, it's easy enough to branch a new template for articles.
Currently there is a PHP variable $selected_card (yes I know, same name in both modules). If that is set to something you're in single article view mode. The template currently doesn't care which view mode you're using, but you could pass this to the template and make decisions based on it.
You might save the next paragraph or two somewhere because it contains some important considerations for what you're trying to pull off.
The conversation() function knows about a thing called 'list' mode which uses a different "condensed" item template. You can set this for instance for your channel or network page or even pubstream pages on your site.
The problem is the variable we are using has three different values. 'traditional' or old-fashioned page=n use, 'client' or AJAX updates, and 'list' which is AJAX with the alternate template. (edit: there's also a page mode called 'preview', so there are four).
The problem is that articles and cards aren't ajax enabled. So you can't just turn on list mode and everything will just work. The list mode is currently assuming that ajax is in use. Converting these pages to an ajax loader will happen eventually but not today. It's a fair chunk of work. The easiest way I can see to get where you want to go is to create yet another page_mode variable which represents list mode but with the traditional page loader. This would be incredibly easy to pull off and would let you specify a list mode for these pages. No doubt you'll want to modify our ugly list-mode template but you would be doing that anyway.
-
Update: I've just made list mode work for articles and cards. Youl'l see it in dev in a day or two. What you will need to do is visit
https://deadsuperhero.com/pconfig/system/articles_list_mode
and set it to '1'. And your articles overview page will be in list mode rather than conversation mode.
-
!Hubzilla Development
Interesting...
-
https://deadsuperhero.com/channel/dsh/?f=&mid=78a2df90b06b0db8c1308fb08ace40efd2b9e10f4317e7ab580ba7b9d2fde6f9@deadsuperhero.com
more interesting if you can see all ....