Breezingform on joomla 3 - joomla3.1

Im currently using joomla 3.1 with breezingform lite build 818 extension.
Ive already created a form. I want to use the article title as the form title. I've already tried using this <?php return JFactory::getDocument()->getTitle(); ?>as value of the text field. But this command only returns the form title. A few pages are using this one form so I need to know which one is from which page. Btw, ive already search and posted in their forums but no reply.

I am from crosstec, sorry that we missed you.
What you need is the browser title:
Go to Form -> Advanced -> More Options -> Pieces -> After Form -> Click "custom" -> add this
echo '<script>ff_getElementByName("NAMEOFHIDDEN").value = document.title;</script>';
NAMEOFHIDDEN would be the name of a hidden input field that you can create to store the current document title to.
Regards,
Markus

Related

Add new input field to ACF Link

I am currently trying to add an additional input field where users are able to specify an aria-label inside the already existing link field within Advanced Custom Fields in Wordpress. I’ve attached an image to give a visual representation of what I am looking to do.
Link Modal
Then on the frontend you would use something like $link[aria-label] to get it from the link array.
Any help to achieve this would be amazing. Thank you!
You can try if that field already exists in the ACF link.
Store that link value in a variable and print_r it and check. Check the below code.
<?php
$link = get_field('YOUR-FIELD-NAME');
print_r($link);
?>

Divi Builder render html code on post type

I'm creating a website and I meet an issue with Divi / CPT UI.
I create a post type name "tente". In order to build the page with Divi builder, I add in function.php this code :
function my_et_builder_post_types( $post_types ){
$post_types[] = 'tentes';
return $post_types;
}
add_filter('et_builder_post_types', 'my_et_builder_post_types');
This is working, because I can use Divi builder in post type.
But, when I use tab element, the builder render HTML code on my website.
See what I've done :
And what it give to me on website :
I look at the Divi doc. I don't found something interesting about it.
Some of you have an idea ?
I am assuming you are on the latest version of Divi if not you need to update. Divi now allows for custom post types to get access to the builder. If you updated then do the following:
Remove the code you added above
In my case, I use CPT UI and have a post type named Doctors as shown below
Just go to Divi --> Theme options --> Builder --> Post Type Integration and make sure you Custom post type shows as Enabled as shown below
Your code might work but it's better to use the built-in way now that it exists.
Now, for the HTML problem.
Make sure you are in text mode NOT visual mode as shown below
Add the required shortcode to create 3 tabs
[et_pb_tabs admin_label="Tabs" use_border_color="off" border_color="#ffffff" border_style="solid"] [et_pb_tab title="Description" tab_font_select="default" tab_line_height="2em" tab_line_height_tablet="2em" tab_line_height_phone="2em" body_font_select="default" body_line_height="2em" body_line_height_tablet="2em" body_line_height_phone="2em"]
This is title1
[/et_pb_tab][et_pb_tab title="Managment" tab_font_select="default" tab_line_height="2em" tab_line_height_tablet="2em" tab_line_height_phone="2em" body_font_select="default" body_line_height="2em" body_line_height_tablet="2em" body_line_height_phone="2em"]
This is title2.
[/et_pb_tab][et_pb_tab title="Photos" tab_font_select="default" tab_line_height="2em" tab_line_height_tablet="2em" tab_line_height_phone="2em" body_font_select="default" body_line_height="2em" body_line_height_tablet="2em" body_line_height_phone="2em"]
This is title3.
[/et_pb_tab] [/et_pb_tabs]
This gives the following result
Now look at the above code while you are still in TEXT MODE and add your HTML where it says This is title1, This is title2 and This is title3 to populate the tabs with what you need. Hope this helps

add custom field template to theme admin page

in WP admin how to add the custom field template plugin to a theme page?
it automatically shows in posts and pages but i want this in the theme page. the theme am using is from iwak "creations" portfolio page.
what files do i need to modify to add this?
It's very hard to say what you need to modify without being able to look at the code. Being a premium theme, we can't just download it and take a look.
Having said that, the theme may use the WordPress custom post type functionality. Search the code for a call to the register_post_type function. If it's used, you may be in luck. Either
add 'custom-fields' to the supports argument in that call, or
call add_post_type_support after the post type is registered. The $post_type parameter will be the first value passed to the register_post_type function, and the $supports parameter will be 'custom-fields'.
Daniel, are you using this Custom Post Type Plugin - http://wordpress.org/extend/plugins/custom-field-template/screenshots/? I've used it before, and the guy who created it is Japanese, so his personal page isn't very useful as far as support for english goes.
I had some trouble with this at first. But what I think you're trying to do is add the custom fields to your new pages you've created, correct?
It's not very straightforward, but once it works it's pretty awesome.
Basically, when you set up the plugin you create these different "Custom fields," right? Well part of that should look like this:
[Custom Field Name]
type = textarea
rows = 4
cols = 40
tinyMCE = true
htmlEditor = true
Ok, so once you've created those "Custom fields" keep note of the part in brackets. You'll add this to your template pages:
<?php getCustomField('Custom Field Name'); ?>
Now when you enter the info in the pages or posts, the content should appear as you've entered it.

wordpress custom archive page type

i'm starting with wordpress (from a drupal background) and trying to figure out how to create a new "menu" or url pattern. not quite sure what the lingo is in wordpress so im having a little trouble searching online for it.
the current archive allows you to sort by: /post/date/2010/06
what i'm trying to do is extend the archive functionality to include a "day" as well.
ie. /post/date/2010/06/22
i dont mind creating a new page type for this purpose such as /archive/YYYY/MM/DD or something like that.
not sure where to begin with matching the "url pattern" to the "url handler" function or template.
I ended up using:
<ul><?php wp_get_archives('type=daily'); ?></ul>
It gave me an archival list of links which point directly to the pages I needed.
The archive already supported filtering by day, so I just needed to find a way to access it.
The url pattern is /post/yyyy/mm/dd
If anyone is interested in generating a link directly to that page, use:
<?php echo get_day_link(2010, 6, 20); ?>
Wordpress can customize the style of permalinks you use on the Settings/Permalinks tab of your administrative page. It sounds like you want something like /%year%/%monthnum%/%day%/%postname%, which should allow you to group by year, year/month, and year/month/date.

Conditional link to node within views?

I have two content types, book and chapter. Each chapter node contains a node reference of the book to which it belongs. I have created a view which displays the title of each chapter for a given book. Within the view, the title field has been configured to link to its node.
All works well. I am now interested in updating the view to not display a link to a chapter's node when the chapter's body is empty. Thus this view would display a list of chapter titles for a book and link only to those chapters that have a body.
Can this be accomplished using out of the box Views functionality? If not, how would something like this be accomplished?
Thanks.
I'd use the Views Custom Field module to implement your custom logic. It allows you to grab the data fetched by Views and manipulate it at will with PHP. Very handy.
I'm answering my own question because my response to ceejayoz is poorly formatted.
What I did to accomplish this was to first download and enable views_customfield. Second, I placed Title and Body fields within the view, both excluded from display. Third, within a Customfield: PHP code field I placed the following code:
<?php
if (strlen(trim($data->node_revisions_body)) == 0) {
return $data->node_title;
} else {
return l($data->node_title, drupal_get_path_alias('node/' . $data->nid));
}
?>
There's also this clever workaround which allows you to achieve this very easily:
Add 2 title fields one with link and one with no link, and make both
them exclude from display.
Add body field,
In No result behavior put title with no link replacement token to
it.
In Rewrite results behavior put title with link replacement token to
it.
Tick hide if empty.
Source

Resources