In Powerpoint, starting from a presentation, it is easy to create a link to a specific slide of another presentation.
I'm trying to figure out how to do the same thing with an external url (for example from a web page).
Thanks for any suggestions.
A VBA macro in Excel can probably do the job for you with local files:
Sub JumpToSlide()
Dim oPPT As Object
Set oPPT = CreateObject("PowerPoint.Application")
With oPPT
.presentations.Open ("C:\temp\test.pptx")
.ActiveWindow.View.gotoslide (8)
End With
End Sub
Related
in my Drupal 8 site, i have sections tagged with terms like "Therapies" and "Team", where the single contents (each therapy, each person ...) are nodes with anchors. The nodes (the whole team for example) are displayed on one page.
In my menu its not a problem to append the anchor-hashtag to exactly scroll to the single therapy or team-member.
But: I also use entity-references to link to the different nodes. Those links are generated inside the system automatically (e.g. therapy/massage.html). I now want to create a rewrite rule that rewrites all node-links to (e.g.) xxx.xxx.com/therapy#massage, where "massage" is the title of the node.
Hint: It is NOT possible to do this with pathauto! I already tried that.
Thanks in advance and regard,
Fab
Looks like it's possible with Url::fromUserInput()
Take a look at the following link: https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Url.php/function/Url%3A%3AfromUserInput/8.1.x
Your code will look something like this
$url = Url::fromUserInput('#' . $node->getTitle());
Where to put this depends on how you create your page.
If it's a standard view (which I'm assuming) you have to hook into the creation of your link and change the URL.
For the above you need to create a module and add the hook into your .module file.
The hook you're going to need is hook_link_alter(), you can find the documentation here: https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Menu!menu.api.php/function/hook_link_alter/8.1.x
/**
* Implements hook_link_alter().
*/
function module_link_alter(&$variables) {
/** #var NodeInterface $node */
$node = $variables['options']['node'];
if ($node != NULL){
$variables['url'] = Url::fromUserInput('#' . $node->getTitle());
}
The code above should get you on your way, I'm not entirely sure if it'll work since I haven't tried it yet.
Hope this helps!
I have view where I show information through several panels, one panel for each category.
I would like to have the list of panels-to-show in a constant/variable/container which the view can access and show only those panels.
(At least so far) This list of panels is specific to this view.
What is the right place to store such view specific configuration?
Some choices I can think of are
(i) variables in the controller action (related to that view)
(ii) in the view helper method
(iii) in the view itself
Thanks,
Kumar
Create a file in config/initializers/constant.rb
Put your all CONSTANT here
When I create a website with configuration like you're looking for, I use a Configuration Store.
Try / Take a look at the following gem : https://github.com/chatgris/Gaston
I am fairly new to Umbraco and I am wondering where I should put pieces of random data.
I have a lot of experience with Sitecore, used it for several years, I am certified etc etc. But now I have to build something with Umbraco. At a first glance Umbraco looks inferior to Sitecore in every way, but I might be wrong about that.
So what I am wondering is, where should I put non-browsable pieces of data that are visible on several places throughout the website? I'd like to create data items in Umbraco for things like Testimonials, Offices? I'd like to have a centralized place in Umbraco where they can be maintained and reference them from a page node. But the way it looks now is that everything has to be on the page node. Which is sort ok, for your average family webpage.
Could someone please shed some light on this?
You could create another node under the man content and call it site settings and store them there that way all pages under the home page are just visible pages on the front end and all data nodes are in a separate area.
There is one property in umbraco that you can add to document types and name it "umbracoNaviHide" (for alias, the name can be anything). This allows wires in automatically to the .IsVisible() method.
var children = Model.Content.Children.Where(x => x.IsVisible());
I find this situation to be very frequent, think of slideshows. When I make an Umbraco website, under my root node I normalle havea Slideshow document type (that contains slides) and I programmatically traverse those to build the slideshow on the home page for example. This Slideshow document has that "umbracoNaviHide" property and I skip it from my menus either using the .IsVisible() method or by manually skipping specific document types.
var menuItems = Model.Content.Children.Where(x => x.DocumentTypeAlias != "Slideshow" && x.DocumentTypeAlias != "Search");
On the other hand, if you are looking for "labels", you can look at "Dictionnary" items under the "Settings" tab.
To directly answer your questions, I reccomend putting non-browsable pieces of data as children of the relevant browsable content node. (But there are other valid ways to do this, it really is up to you and what's best for your content editors.)
Hope this helps.
So the problem I am trying to solve requires that if the user types in a text box their user name and press enter then the files in the directory will display in the List Box. I need it to only work on the C:\Users directory. I am new to Visual Basic but not to programming so any basic advice would be helpful.
You need to do something like this:
Dim di As New IO.DirectoryInfo("c:\")
Dim diar1 As IO.FileInfo() = di.GetFiles()
Dim dra As IO.FileInfo
'list the names of all files in the specified directory
For Each dra In diar1
ListBox1.Items.Add(dra)
Next
You can read more from this site, http://www.developerfusion.com/code/3681/list-files-in-a-directory/
The scenario:
I have an ApEx page which pulls a record from a table. The record contains an id, the name of the chart (actually a filename) and the code for an image map as an NVARCHAR2 column called image_map.
When I render the page I have an embedded HTML region which pulls the image in using the #WORKSPACE_IMAGES#&P19_IMAGE. substitution as the src for the image.
Each chart has hot spots (defined in the image_map html markup) which point to other charts on the same ApEx page. I need to embed the:
Application ID (like &APP_ID.)
Session (like &APP_SESSION.)
My problem:
When I try to load the &APP_ID as part of the source into the database it pre-parses it and plugs in the value for the ApEx development app (e.g. 4500) instead of the actual target application (118).
Any help would be greatly appreciated.
Not a lot of feedback - guess I'm doing something atypical?
In case someone else is trying to do this, the workaround I ended up using was to have a javascript run and replace some custom replacement flags in the urls. The script is embedded in the template of the page and assigns the APEX magic fields to local variables, e.g.:
var my_app_id = '&APP_ID';
Not pretty, but it works...
Ok - I think I've left this open long enough... In the event that anyone else is trying to (mis)use apex in a similar way, it seems like the "apex way" is to use dynamic actions (which seem stable from 4.1.x) and then you can do your dynamic replace from there rather than embedding js in the page(s) themselves.
This seems to be the most maintainable, so I'll mark this as the answer - but if someone else has a better idea, I'm open to education!
I found it difficult to set a dynamic URL on a link to another page - directly - attempting to include the full URL as an individual link target doesn't work, at least in my simplistic world, I'm not an expert (as AJ said: any wisdom appreciated).
Instead, I set individual components of the url via the link, and a 'Before Header' PL/SQL process on the targeted page to combine the elements into a full url and assign it to the full url page-item:
APEX_UTIL.set_session_state(
'PG_FULL_URL',
'http...'||
v('PG_URL_COMPONENT1')||
v('PG_URL_COMPONENT2')||
'..etc..'
);
...where PG_FULL_URL is an item of Type 'Display Image', 'Based On' 'Image URL stored in Page Item Value'.
This is Apex 5.1 btw, I don't know if some of these options are new in this release.