• Resolved Ditto Dito

    (@ditto-dito)


    That is a brilliant little plugin. Thank you!

    I am wondering about how I should proceed if I wanted to, say, change the list-layout. I can, of course, directly modify “list-default.html”, but that would make updating Nooz a bit more difficult.

    What about a parameter to the Nooz shortcode that allows to define a different template file inside the themes directory ?

    Another question : How can I inject data into Twig? I would like to add some fields using ACF, but how do I get these across into the template?

    Thanks!
    Ditto

    https://www.ads-software.com/plugins/nooz/

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Contributor farinspace

    (@farinspace)

    We just released v0.11.0, which adds a filter that you can use to modify the shortcode output.

    add_filter( 'nooz_shortcode', function ( $output, $data ) { return $output; }, 10, 2 );

    With this filter you get the final HTML $output and the $data associated with that output.

    We do not give access to Twig as we consider it internal to the plugin (allowing us to change the templating engine if needed). However, you are free to include Twig on your own and create your own templates using the provided $data.

    Hope this helps.

    p.s. If you are finding this plugin useful, please consider writing a five star review!

    Plugin Author mightydigital

    (@mightydigital)

    marking as resolved!

    Thread Starter Ditto Dito

    (@ditto-dito)

    Thanks !

    I am not sure how this filter resolves my question. I will have a go and see how far it gets me.

    In the meantime, I am re-setting the topic to “not resolved” – don’t be too quick ??

    Plugin Author mightydigital

    (@mightydigital)

    With the filter you can modify the final HTML output, inside this filter you have full access to the $data, basically create the HTML output that you need. If you choose to use Twig yourself, you can. Equally you have access to the post ID which you can use to get ACF data and use it while creating your custom HTML output.

    Thread Starter Ditto Dito

    (@ditto-dito)

    Quite a bit disappointing to suggest to write a function to output html-code.

    The plugin induces quite a bit of overhead with a Twig and Symfony-loader, plus own code. And all this is wrapped away because you consider these “internal”.

    Why don’t you simply let me hand you a Twig template as the worst solution. Or just let me write an ordinary php template.

    For the moment, your suggestion “please consider writing a five star review!” is on hold. The plugin has great potential, but is still a bit off what users need. You may want to check this support forum – and don’t bother thinking that because a thread is marked “resolved” that it is resolved.

    Sorry guys.

    Plugin Contributor farinspace

    (@farinspace)

    @ditto, again we very much appreciate your suggestions and we will always take our end users into consideration.

    However we will always do what is right to facilitate our development and a clear upgrade path. At this moment our decision of offering a filter is the best course of action.

    Twig is definitely a heavy package, hence at some point it may be changed, and we will not lock ourselves in to supporting it just because.

    In this situation a filter is a better solution, broader, allowing more customization for the end user, in fact as you suggest, you can write your own php template very easily with a filter (E.g. including a php file/template and the provided data).

    Resolved or not, what you are asking for specifically is unsupported.

    Thanks again for your thoughts.

    Thread Starter Ditto Dito

    (@ditto-dito)

    @farinspace, good arguments. I can agree to them.

    I am set with your solution. I initially serialized() the $data and shoved it over into a page template. Not quite as elegant as your suggestion.

    Thanks for your support. Good stuff!

    Plugin Contributor farinspace

    (@farinspace)

    For others who may stumble upon this thread, the code reference can be found on this topic: Change order of how the press coverage appears

    First, as a former PR person who now does web sites, I love the idea of your plugin. However, there needs to be more layout options. My client is complaining that there is a bullet – part of a UL – that is not to his liking.

    I’ve tweaked the styles as much as I could, even looking for a script that would strip the UL out of the output, too no avail. I’ve looked at the supposed script for the Theme_Functions.php and it crashed my site and I have had to go in and manually remove the “function” to make the site load.

    If you could even add some basic if then statements, such as “Do you want the list to appear as a series of bullet points?”, that in itself would be a huge improvement. I am even willing to pay to get rid of the bullet points.

    Thread Starter Ditto Dito

    (@ditto-dito)

    @jerepowers : You can get rid of the bullet points with a little bit of CSS :

    ul.nooz-list {
    list-style: none;
    padding-left: 0;
    }

    Perfect! Thanks!

    I have a situation where a company has a minor division for which they want their news releases only.

    So all news releases go into the news release database and then just some of them, for Law Enforcement, are printed out on a separate news release page.

    I see you have slugs, so theoretically could I have a page in which I add the slug to it and have those appear instead of the release slug?

    Or can I somehow create post categories and use that in a “type” shortcode?

    Plugin Contributor farinspace

    (@farinspace)

    Out of the box, what you are asking for is not possible at the moment.

    OK. At least I won’t spend time on it.

    By the way, news releases are important for companies – enough that they would pay to have a few more features. Sarbanes-Oxley says so. It would be worth investing a bit more time and allowing a bit more customization. My client wouldn’t be scared by a fee.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Using own layouts and formats’ is closed to new replies.