I have a list of Tridion page URL's in an excel sheet, which should be unpublished on Click of a button for which I am developing a custom page. How do I read the URL from the publication.? For example, the URL looks like "https://www.example.com/us/en/abc/cde/index.html" (us/en - country/language; abc- folder in structure group, cde- subfolder in abc, index.html is the page) Now index.html should be unpublished.
How to Read the Tridion Page URL from the publication using Core Services?
113 Views Asked by hulda.rachel At
1
There are 1 best solutions below
Related Questions in TRIDION
- Firefox vim mode, can't switch to normal mode in style editor
- How to skip a command in redo
- Vim errorformat multiline string
- How to let Vim tell the switching across several `gvim.exe` processes?
- match wordchar and/or dot string of anylength
- augment the number of lines on indent
- Barebones vim with `nocp`
- Moved .vimrc in a new dir, trying to get it to work
- Copying text from gvim editor to system clipboard works only once per session
- Temporarily declare a word as wrong in vim spellchecker
Related Questions in TRIDION-CORE-SERVICES
- Firefox vim mode, can't switch to normal mode in style editor
- How to skip a command in redo
- Vim errorformat multiline string
- How to let Vim tell the switching across several `gvim.exe` processes?
- match wordchar and/or dot string of anylength
- augment the number of lines on indent
- Barebones vim with `nocp`
- Moved .vimrc in a new dir, trying to get it to work
- Copying text from gvim editor to system clipboard works only once per session
- Temporarily declare a word as wrong in vim spellchecker
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
If I understand you correctly, you have the URL of a page and you want to find the corresponding page in Tridion. First the bad news: The core service (the CM API) does not support a 'find by url'. The quick and dirty approach would be to use the CD API to retrieve the page. This will give you Page back which has an ID property. You can then use the core service to unpublish the page.
You can also do it with a pure core service approach but it's a bit more work and it's slow. It goes like this:
Start from the top level directory (in your example 'us')
List all structure groups inside the root using a filter like this:
var filter = new OrganizationalItemItemsFilterData() { ItemTypes = new ItemType[] { ItemType.Page }, IncludePathColumn = true };
Use Linq to find the one with the top-level directory you're after
Move to the next directory and repeat with the child structure group you found