possible to fill JText Joomla with dynamic content - joomla1.7

Is possible to fill JText in Joomla with dynamic content and still using translation
or some body knows a workout for this situation
<?php echo JText::_( $this->catname[1]);?>
greetings Brem

Yes.
It's possible and you can use the translations too.

Related

How to show list content in Twig Drupal 8 without views

Sorry, I'm newbie in Drupal 8.
Is there any ways if we want to show content using Twig template in Drupal 8.
I have 2 kind of content let's say:
Article Content
Slider Content
I want to show them in front of my Drupal 8 page.
I see another suggestion is using views, but can I show them via Twig template?
Thanks for help.
Yes, you can. You have to create your own controller or custom plugin block to loads pages that you want and prints it in twig. Or you have to prepare your nodes variable using hook_preprocess_hook and then it will be able using twig.
doc #here

Set Modx Revolution :nl2br to Output HTML

Is there a way to set Modx Revolution to output HTML <br>s using the :nlb2r output filter rather than XHTML <br />s through a system setting?
Just create custom snippet - http://rtfm.modx.com/display/revolution20/Input+and+Output+Filters+%28Output+Modifiers%29 , as example:
<?php
$mode = !empty($options) ? true : false;
return nl2br($input, $mode);
This filter does not depend on the system settings, he is located in the code modx- https://github.com/modxcms/revolution/blob/develop/core/model/modx/filters/modoutputfilter.class.php#L431 so you need to create custom snippet.
Output filters are hard coded.
You could always:
SomeElement:nl2br:replace=`<br />==<br>`
Not really sure you want to drop the / as HTML5 simply ignores it. But any case, replace will serve you well.
Check out chapter 7 of my book, it has all of the filters and examples on how to chain them.
You should avoid using snippets and filters are much as you can. They increase the parsing-time.
There's a setting for what you ask
Search for tiny.element_format and change it to html.

display only the content of a page in lightbox2 in drupal

I am using drupal.I have to display the content of a page in lightbox2.(only the content not header,footer,menubar,sidebar etc).The url of that content node is http://mysite.com/node/1.
I have included the lightbox2 module and used the below code
<li>click here to see node content</li>
But the lightbox displays the whole page not only the content.i need only the text content.
One more option in that you can pass a parameter in get method for lightbox2 content.
Based on the parameter add condition in page.tpl.php
Not the best of the solution, but achievable.
Create a new page.tpl for node/1 and print only $content in this.
this way you will make sure you only get content and nothing else
I Agree with Vaibhav Jain, you can create a theme for the page without the header, left and right, footer. only the content and call that page inside the lightbox

drag and drop in drupal 6 block

I am working on drupal. I am facing problem in block. There is no drag and drop function on the page. When i dissable javascript on my browser it show weight option to set manually, after enable again it is not showing.
can any one suggest about this type of problem. if there is any css related issue please suggest me about this
Usually, when this happens, the <?php print $scripts; ?> call in your theme's page.tpl.php is missing, so that Drupal's JavaScript files aren't being included (it's JavaScript that creates the drag and drop features). Or there is an error/conflict in your JavaScript/jQuery.
Is $scripts being printed in your theme?

Hide username and date in Drupal page

I need to make a completely blank page in Drupal. If I don't give body of the page then it is showing the username and date as must. Is there any way to hide this information?
Or can I get the method which generates the contents of a page?
Thanks
Yes, you need to go to the admin panel. In Site building->Themes->Configure->Global Settings there's a box titled "display post information". Tick or untic the content types where you want to show/hide the info.
If you want to do it the hard way, then yes, there is a way of doing it in PHP. In your theme code, you can create a template for either your content type or even an individual page (node-24.tpl.php, where 24 is your node's NID). There, you can write anything you consider necessary, like:
<?php
echo "<h2>$title</h2>";
echo $content;
This will display only the page title and the page body, with no additional sweetness whatsoever :).

Resources