Replies: 3 comments 8 replies
-
@Jimmi08 You're thinking something like a catalogue? I think the only way is like my stampcat plugin, that i think i've sent you sometime ago.... I render the pageheader, the the page body is rendered in a loop with templates inside, and after the page footer: These are my loop templates, and since i got the amount of loops defined in the plugin backend, i call it the times defined there
If i want something out of the loops i use this:
Of course there's wrappers around these shortcodes, but i don't show it here or the code would be too long... |
Beta Was this translation helpful? Give feedback.
-
Looking for inspiration.... well do not know the whole idea but somewhat even more advanced styling of faqs ? as @Alex-e107nl did |
Beta Was this translation helpful? Give feedback.
-
Ok, guys, still haven't solved items but I solved layouts. First, I don't need this in real life, I am just playing, but I can imagine using this for some of my future plugins, if there will be some. Second, forget legacy stuff. I know how to write this many other ways. I play with jobs (Father Barry jobs_search plugin) because this way I can spend time on it at work. Psst. What I knew:
I don't know how to use e_frontend handler (there are not enough examples and if there are some, they are different). Then I remembered that this is solved in the comment class for comments layout, so I did the same thing. My solution:
where $page_render["caption"] and $page_render["text"] are normal values for tablerender filled before. They are responsible for the content itself.
Just a minimal version:
Any theme can override this with the needed HTML markup. For example, {CAPTION} is not used because the theme layout use magic shortcodes... But you can use a bare layout and put everything into your theme template. TOP and BOTTOM are templates too (the code is from the original old plugin)
Simple output for any position (top, bottom for now.)
Then I found a way how to set routes and canonical URL were changed... But I am proud of my breadcrumbs:
|
Beta Was this translation helpful? Give feedback.
-
Hi,
it looks like we are now discussing a lot of ideas, so I am curious about this one.
Imagine single category page with parts:
How to combine templates and shortcodes?
Example:
or
in code for category page output:
or ? any ideas? I tried to look at news plugin, but I don't think it should be standard for new plugins.
Template for categories has to be 2 dimensional because you can have more layouts for single category.
I prefer to split template for category and items into separated files, the same with shortcodes...
The question is how to combine a single category and loop of items....
For now... my last idea is layout template and simple parsing on category page - this way I avoid loop in shortcodes and any layout is possible.
Beta Was this translation helpful? Give feedback.
All reactions