I use a lot of the same url throughout my wikis.
For instance, I'll use an external url link to http://www.breakawayhondagreenville.com/searchnew.aspx?pn=10&model=Fit a great number of times around images and text throughout my wiki.
Once in a while, I need to update the url requiring me to go back thru my wiki and update each reference to the url.
I've searched high and low on the forum and user documentation for a way to define a url once, then refer to its named definition.
This is only a wish if this is not already possible to do (in which case I'd appreciate an example + suggest that the same be added to the documentation / handbook).
I've solved this problem before using redirects.
Simply put this code on one of your pages, e.g. redirect:breakaway
Then, anywhere you want to place a link to this site, simply type this:
Or to add custom link text:
To edit this link, just edit the "redirect:breakaway" page and change the link there! ;-)
You can also use the Wikidot API for this. You could write a program (or I could write one for you) that searches through every page on your site and changes the link for you.
That might be useful for you to set up what I described above, in fact… changing tons of links to something like [[[redirect:breakaway]]] instead automatically, using the API.
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
That isn't what my understanding of what an API is for, but I am a path of least resistance kind of fellow. So long as it would be reusable and search then edit/replace the whole site, it could work.
Alternatively, does the breakaway command outlined above work with:
1) The image function such as I use it here?
Don't images take the user to the image in the absence of the link parameter?
2) Or the url link command as I use it here?
Next: Shop Online
Here is the page on the site where the above examples came from
http://www.greenville-honda-civic-coupe.com/2010-honda-civic-coupe-dx-colors
Appreciate the help.
And since I'm wishing, for the image function, it would be nice to be able to set text variables for title and alt tags once for defined names, then call the within the image tag.
So for example, if I put a command such as this in my css or _template page:
.Targeturl {
url(Breakaway-Home link="http://www.breakawayhondagreenville.com" title="Click to go to the home page of Breakaway Honda" alt="Click to go to the home page of Breakaway Honda");
url(Breakaway-Civic-Sedan link="http://www.breakawayhondagreenville.com/searchnew.aspx?pn=10&model=Civic&bodyStyle=Sedan" title="Click to go to see Breakaway Honda's new Honda Civic Sedan Inventory" alt="Click to go to see Breakaway Honda's new Honda Civic Sedan Inventory");
}
I think you misunderstand how my solution works.
Basically, by typing [[[SomePageName]]], you are creating a link to another page on your site. When the user visits that page, they are then redirected to where you want them to go. Therefore there is an extra (invisible) step involved.
With images this won't work, obviously. You would need to use an include instead. For example, [[include MyPage]]. But as hot-linking images from other websites is heavily discouraged, it's probably better to host the image on your own site and simply re-upload that whenever you want to change it.
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
That doesn't look like CSS to me… so I'm not sure what you are trying to say here. Sorry :S
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
With respect to this…
That doesn't look like CSS to me… so I'm not sure what you are trying to say here.
I was trying to propose a method or means to define a series of "names" to use within the link parameter associated with the image and url commands within my wiki.
The goal is to define the url link name once, then use it many times throughout the site. That way if the url changes I need only update it once not every time it appears on every page and on every image or link.
Then you need to use the redirect trick that leiger described. That would work anywhere on your site that had a link, in images or in normal links.
You could not use it for the source of the image, but as leiger also said, you probably ought not to use images that are hosted on another site anyway. It uses their bandwidth and is considered bad manners. You could upload the image to your wikidot site once and then use it in any number of pages. When you need to change it, just upload another image and give it the same name.
So. For links: create a page on your site that redirects to the page you want, and then link to that page. To change the link just change the redirection. For images: upload the image once to a page on your site, then use that in any number of pages. When you want to change the image, just upload a new image, with the same name, in place of the old one.
This will do exactly what you want: it will create a url link name that you can use in your site. The url link name is the url of the page (for links) or the file (for images). Wikidot give you the basic functionality, but you can use that to build more advanced functionality on top. That is how the really cool stuff is made. It is a lot more flexible than if Wikidot had to create everything, but it does need a bit of flexibility, lateral thinking and a learning curve on the part of the site administrator.
Alt text and so forth is a wish for another day.
Ai-Dealer, rurwin and I are more than willing to help you set this up… just ask if you're not sure about something.
I'm certain that this is the solution you are looking for ;-)
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)